This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Control.Lens | |
import Control.Monad.Loops | |
import Control.Monad.State.Strict | |
import Data.List | |
import Data.List.Split | |
import Data.Maybe | |
data SudokuValue = S1 | S2 | S3 | S4 | S5 | S6 | S7 | S8 | S9 deriving (Eq, Enum) | |
instance Show SudokuValue where | |
show s = show $ fromJust (s `elemIndex` [S1 ..]) + 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Network.Socket hiding (send, sendTo, recv, recvFrom) | |
import Network.Socket.ByteString | |
import Control.Concurrent | |
port = 4242 | |
incomingBufferSize = 4096 | |
delayMicroseconds = 500000 | |
main = do | |
-- Listen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Network.Socket hiding (send, sendTo, recv, recvFrom) | |
import Network.Socket.ByteString | |
import Control.Concurrent | |
port = 4242 | |
incomingBufferSize = 4096 | |
main = do | |
-- Listen | |
sock <- socket AF_INET Stream 0 |
NewerOlder