1- {-# LANGUAGE ExplicitForAll #-}
21{-# LANGUAGE OverloadedStrings #-}
32{-# LANGUAGE Rank2Types #-}
43
@@ -170,8 +169,6 @@ builtinTypesSrc =
170169 , B' " Value" CT. Data
171170 , B' " Any" CT. Data
172171 , B' " crypto.HashAlgorithm" CT. Data
173- , B' " IOFailure" CT. Data , Rename' " IOFailure" " io2.IOFailure"
174- , B' " TlsFailure" CT. Data , Rename' " TlsFailure" " io2.TlsFailure"
175172 , B' " Tls" CT. Data , Rename' " Tls" " io2.Tls"
176173 , B' " Tls.ClientConfig" CT. Data , Rename' " Tls.ClientConfig" " io2.Tls.ClientConfig"
177174 , B' " Tls.ServerConfig" CT. Data , Rename' " Tls.ServerConfig" " io2.Tls.ServerConfig"
@@ -395,7 +392,7 @@ builtinsSrc =
395392 , B " Text.toCharList" $ text --> list char
396393 , B " Text.fromCharList" $ list char --> text
397394 , B " Text.toUtf8" $ text --> bytes
398- , B " Text.fromUtf8.v3" $ bytes --> eithert failure text
395+ , B " Text.fromUtf8.impl. v3" $ bytes --> eithert failure text
399396 , B " Char.toNat" $ char --> nat
400397 , B " Char.fromNat" $ nat --> char
401398
@@ -509,55 +506,54 @@ hashBuiltins =
509506
510507ioBuiltins :: Var v => [(Text , Type v )]
511508ioBuiltins =
512- [ (" IO.openFile.v3" , text --> fmode --> iof handle)
513- , (" IO.closeFile.v3" , handle --> iof unit)
514- , (" IO.isFileEOF.v3" , handle --> iof boolean)
515- , (" IO.isFileOpen.v3" , handle --> iof boolean)
516- , (" IO.isSeekable.v3" , handle --> iof boolean)
517- , (" IO.seekHandle.v3" , handle --> smode --> int --> iof unit)
518- , (" IO.handlePosition.v3" , handle --> iof nat)
519- , (" IO.getBuffering.v3" , handle --> iof bmode)
520- , (" IO.setBuffering.v3" , handle --> bmode --> iof unit)
521- , (" IO.getBytes.v3" , handle --> nat --> iof bytes)
522- , (" IO.putBytes.v3" , handle --> bytes --> iof unit)
523- , (" IO.systemTime.v3" , unit --> iof nat)
524- , (" IO.getTempDirectory.v3" , unit --> iof text)
525- , (" IO.createTempDirectory" , text --> iof text)
526- , (" IO.getCurrentDirectory.v3" , unit --> iof text)
527- , (" IO.setCurrentDirectory.v3" , text --> iof unit)
528- , (" IO.fileExists.v3" , text --> iof boolean)
529- , (" IO.isDirectory.v3" , text --> iof boolean)
530- , (" IO.createDirectory.v3" , text --> iof unit)
531- , (" IO.removeDirectory.v3" , text --> iof unit)
532- , (" IO.renameDirectory.v3" , text --> text --> iof unit)
533- , (" IO.removeFile.v3" , text --> iof unit)
534- , (" IO.renameFile.v3" , text --> text --> iof unit)
535- , (" IO.getFileTimestamp.v3" , text --> iof nat)
536- , (" IO.getFileSize.v3" , text --> iof nat)
537- , (" IO.serverSocket.v3" , optionalt text --> text --> iof socket)
538- , (" IO.listen.v3" , socket --> iof unit)
539- , (" IO.clientSocket.v3" , text --> text --> iof socket)
540- , (" IO.closeSocket.v3" , socket --> iof unit)
541- , (" IO.socketPort" , socket --> iof nat)
542- , (" IO.socketAccept.v3" , socket --> iof socket)
543- , (" IO.socketSend.v3" , socket --> bytes --> iof unit)
544- , (" IO.socketReceive.v3" , socket --> nat --> iof bytes)
545- , (" IO.forkComp.v2"
546- , forall1 " a" $ \ a -> (unit --> io a) --> io threadId)
509+ [ (" IO.openFile.impl.v3" , text --> fmode --> iof handle)
510+ , (" IO.closeFile.impl.v3" , handle --> iof unit)
511+ , (" IO.isFileEOF.impl.v3" , handle --> iof boolean)
512+ , (" IO.isFileOpen.impl.v3" , handle --> iof boolean)
513+ , (" IO.isSeekable.impl.v3" , handle --> iof boolean)
514+ , (" IO.seekHandle.impl.v3" , handle --> smode --> int --> iof unit)
515+ , (" IO.handlePosition.impl.v3" , handle --> iof nat)
516+ , (" IO.getBuffering.impl.v3" , handle --> iof bmode)
517+ , (" IO.setBuffering.impl.v3" , handle --> bmode --> iof unit)
518+ , (" IO.getBytes.impl.v3" , handle --> nat --> iof bytes)
519+ , (" IO.putBytes.impl.v3" , handle --> bytes --> iof unit)
520+ , (" IO.systemTime.impl.v3" , unit --> iof nat)
521+ , (" IO.getTempDirectory.impl.v3" , unit --> iof text)
522+ , (" IO.createTempDirectory.impl.v3" , text --> iof text)
523+ , (" IO.getCurrentDirectory.impl.v3" , unit --> iof text)
524+ , (" IO.setCurrentDirectory.impl.v3" , text --> iof unit)
525+ , (" IO.fileExists.impl.v3" , text --> iof boolean)
526+ , (" IO.isDirectory.impl.v3" , text --> iof boolean)
527+ , (" IO.createDirectory.impl.v3" , text --> iof unit)
528+ , (" IO.removeDirectory.impl.v3" , text --> iof unit)
529+ , (" IO.renameDirectory.impl.v3" , text --> text --> iof unit)
530+ , (" IO.removeFile.impl.v3" , text --> iof unit)
531+ , (" IO.renameFile.impl.v3" , text --> text --> iof unit)
532+ , (" IO.getFileTimestamp.impl.v3" , text --> iof nat)
533+ , (" IO.getFileSize.impl.v3" , text --> iof nat)
534+ , (" IO.serverSocket.impl.v3" , optionalt text --> text --> iof socket)
535+ , (" IO.listen.impl.v3" , socket --> iof unit)
536+ , (" IO.clientSocket.impl.v3" , text --> text --> iof socket)
537+ , (" IO.closeSocket.impl.v3" , socket --> iof unit)
538+ , (" IO.socketPort.impl.v3" , socket --> iof nat)
539+ , (" IO.socketAccept.impl.v3" , socket --> iof socket)
540+ , (" IO.socketSend.impl.v3" , socket --> bytes --> iof unit)
541+ , (" IO.socketReceive.impl.v3" , socket --> nat --> iof bytes)
542+ , (" IO.forkComp.v2" , forall1 " a" $ \ a -> (unit --> io a) --> io threadId)
547543 , (" IO.stdHandle" , stdhandle --> handle)
548544
549- , (" IO.delay.v3" , nat --> iof unit)
550- , (" IO.kill.v3" , threadId --> iof unit)
551- , (" Tls.newClient" , tlsClientConfig --> socket --> iof tls)
552- , (" Tls.newServer" , tlsServerConfig --> socket --> iof tls)
553- , (" Tls.handshake" , tls --> iof unit)
554- , (" Tls.send" , tls --> bytes --> iof unit)
555- , (" Tls.decodeCert" , bytes --> eithert failure tlsSignedCert)
545+ , (" IO.delay.impl. v3" , nat --> iof unit)
546+ , (" IO.kill.impl. v3" , threadId --> iof unit)
547+ , (" Tls.newClient.impl.v3 " , tlsClientConfig --> socket --> iof tls)
548+ , (" Tls.newServer.impl.v3 " , tlsServerConfig --> socket --> iof tls)
549+ , (" Tls.handshake.impl.v3 " , tls --> iof unit)
550+ , (" Tls.send.impl.v3 " , tls --> bytes --> iof unit)
551+ , (" Tls.decodeCert.impl.v3 " , bytes --> eithert failure tlsSignedCert)
556552 , (" Tls.encodeCert" , tlsSignedCert --> bytes)
557553 , (" Tls.decodePrivateKey" , bytes --> list tlsPrivateKey)
558554 , (" Tls.encodePrivateKey" , tlsPrivateKey --> bytes)
559- , (" Tls.receive" , tls --> iof bytes)
560- , (" Tls.terminate" , tls --> iof unit)
555+ , (" Tls.receive.impl.v3 " , tls --> iof bytes)
556+ , (" Tls.terminate.impl.v3 " , tls --> iof unit)
561557 , (" Tls.ClientConfig.default" , text --> bytes --> tlsClientConfig)
562558 , (" Tls.ServerConfig.default" , list tlsSignedCert --> tlsPrivateKey --> tlsServerConfig)
563559 , (" TLS.ClientConfig.ciphers.set" , list tlsCipher --> tlsClientConfig --> tlsClientConfig)
@@ -573,14 +569,14 @@ mvarBuiltins :: forall v. Var v => [(Text, Type v)]
573569mvarBuiltins =
574570 [ (" MVar.new" , forall1 " a" $ \ a -> a --> io (mvar a))
575571 , (" MVar.newEmpty.v2" , forall1 " a" $ \ a -> unit --> io (mvar a))
576- , (" MVar.take.v3" , forall1 " a" $ \ a -> mvar a --> iof a)
572+ , (" MVar.take.impl. v3" , forall1 " a" $ \ a -> mvar a --> iof a)
577573 , (" MVar.tryTake" , forall1 " a" $ \ a -> mvar a --> io (optionalt a))
578- , (" MVar.put.v3" , forall1 " a" $ \ a -> mvar a --> a --> iof unit)
579- , (" MVar.tryPut" , forall1 " a" $ \ a -> mvar a --> a --> io boolean)
580- , (" MVar.swap.v3" , forall1 " a" $ \ a -> mvar a --> a --> iof a)
574+ , (" MVar.put.impl. v3" , forall1 " a" $ \ a -> mvar a --> a --> iof unit)
575+ , (" MVar.tryPut.impl.v3 " , forall1 " a" $ \ a -> mvar a --> a --> iof boolean)
576+ , (" MVar.swap.impl. v3" , forall1 " a" $ \ a -> mvar a --> a --> iof a)
581577 , (" MVar.isEmpty" , forall1 " a" $ \ a -> mvar a --> io boolean)
582- , (" MVar.read.v3" , forall1 " a" $ \ a -> mvar a --> iof a)
583- , (" MVar.tryRead" , forall1 " a" $ \ a -> mvar a --> io (optionalt a))
578+ , (" MVar.read.impl. v3" , forall1 " a" $ \ a -> mvar a --> iof a)
579+ , (" MVar.tryRead.impl.v3 " , forall1 " a" $ \ a -> mvar a --> iof (optionalt a))
584580 ]
585581 where
586582 mvar :: Type v -> Type v
@@ -624,7 +620,7 @@ app :: Ord v => Type v -> Type v -> Type v
624620app = Type. app ()
625621
626622list :: Ord v => Type v -> Type v
627- list arg = Type. vector () `app` arg
623+ list arg = Type. list () `app` arg
628624
629625optionalt :: Ord v => Type v -> Type v
630626optionalt arg = DD. optionalType () `app` arg
0 commit comments