code stringlengths 5 1.03M | repo_name stringlengths 5 90 | path stringlengths 4 158 | license stringclasses 15
values | size int64 5 1.03M | n_ast_errors int64 0 53.9k | ast_max_depth int64 2 4.17k | n_whitespaces int64 0 365k | n_ast_nodes int64 3 317k | n_ast_terminals int64 1 171k | n_ast_nonterminals int64 1 146k | loc int64 -1 37.3k | cycloplexity int64 -1 1.31k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
module GRSynth.Synthesis ( synth
, cox
, fixpointStop
) where
import GRSynth.Formulas
import GRSynth.States
import GRSynth.GameStructure
import GRSynth.Semantics
import Control.Monad.Identity
import Control.Monad.Reader
import Control.Monad.Sta... | johnbcoughlin/mucalc | src/GRSynth/Synthesis.hs | gpl-2.0 | 4,175 | 0 | 19 | 1,710 | 1,261 | 668 | 593 | 80 | 2 |
{-# LANGUAGE RecordWildCards #-}
module DTS (DTS(..), PropertyValue(..), dts) where
import Control.Applicative hiding ((<|>), many)
import Text.Parsec.Language
import qualified Text.Parsec.Token as Tok
import Text.ParserCombinators.Parsec
import Text.ParserCombinators.Parsec.Number
data PropertyValue = String String... | elopez/dtschecker | DTS.hs | gpl-2.0 | 4,285 | 39 | 18 | 1,028 | 1,514 | 802 | 712 | 87 | 4 |
{- Copyright (c) 2007 John Goerzen <jgoerzen@complete.org>
Please see the COPYRIGHT file -}
import System.IO
import Control.Concurrent.MVar
import RsyncParser
import RsyncGUI
import System.Exit
main = do
hSetBuffering stdin (BlockBuffering Nothing)
rsyncinput <- getContents
let rsyncstream = customline... | jgoerzen/gtkrsync | gtkrsyncp.hs | gpl-2.0 | 439 | 0 | 10 | 81 | 98 | 47 | 51 | 12 | 1 |
{-|
Module : Data.HdrHistogram.Config
Copyright : (c) Josh Bohde, 2015
License : GPL-3
Maintainer : josh@joshbohde.com
Stability : experimental
Portability : POSIX
A Haskell implementation of <http://www.hdrhistogram.org/ HdrHistogram>. It allows storing counts of observed values within a range,
while ma... | joshbohde/hdr-histogram | src/Data/HdrHistogram/Config.hs | gpl-3.0 | 2,465 | 0 | 11 | 544 | 471 | 273 | 198 | -1 | -1 |
-----------------------------------------------------------------------------
--
-- Module : Papers
-- Copyright :
-- License : AllRightsReserved
--
-- Maintainer :
-- Stability :
-- Portability :
--
-- |
--
-----------------------------------------------------------------------------
module Papers whe... | jjauhien/hogscholar | src/Papers.hs | gpl-3.0 | 4,599 | 0 | 15 | 1,154 | 1,443 | 785 | 658 | 74 | 2 |
{-# LANGUAGE OverloadedStrings #-}
import Data.Monoid (mappend)
import Hakyll
import Data.Maybe (fromMaybe)
main :: IO ()
main = hakyll $ do
match "static/*" $ do
route idRoute
compile copyFileCompiler
match "images/*" $ do
route idRoute
compile copyFileCompiler
match "index.html" $ do
... | dflicker/website | dtf.hs | gpl-3.0 | 3,344 | 0 | 23 | 847 | 791 | 372 | 419 | 87 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE ViewPatterns #-}
module Application where
import Yesod.Core
import Foundation
import Handler.Operation
import Handler.Home
import Handler.User
import Handler.History
mkYesodDispatch "App" resourcesApp
| grrinchas/ci285-calculator | Application.hs | gpl-3.0 | 302 | 0 | 5 | 50 | 43 | 26 | 17 | 11 | 0 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-genomics/gen/Network/Google/Resource/Genomics/Variants/Patch.hs | mpl-2.0 | 6,419 | 0 | 20 | 1,585 | 1,025 | 597 | 428 | 141 | 1 |
#!/usr/bin/env runhaskell
{-# LANGUAGE TemplateHaskell #-}
import HFlags
defineFlag "name" "Indiana Jones" "Who to greet."
defineFlag "repeat" (3 + 4 :: Int) "Number of times to repeat the message."
main = do s <- $initHFlags "Simple program v0.1"
sequence_ $ replicate flags_repeat greet
putStrL... | nilcons/hflags | examples/SimpleExample.hs | apache-2.0 | 524 | 0 | 9 | 120 | 113 | 53 | 60 | 9 | 1 |
module JDBC.Types.SQLOutput
( writeArraySQLOutput,
writeAsciiStreamSQLOutput,
writeBigDecimalSQLOutput,
writeBlobSQLOutput,
writeBooleanSQLOutput,
writeByteSQLOutput,
writeBytesSQLOutput,
writeCharacterStreamSQLOutput,
writeClobSQLOutput,
writeDateSQLOutput,
writeDoubleSQLOutpu... | Jyothsnasrinivas/eta-jdbc | src/JDBC/Types/SQLOutput.hs | apache-2.0 | 3,679 | 57 | 8 | 528 | 831 | 436 | 395 | -1 | -1 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE OverloadedStrings #-}
import CodeWorld
{-
Copyright 2018 The CodeWorld Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.... | tgdavies/codeworld | codeworld-game-server/src/Bot.hs | apache-2.0 | 5,417 | 0 | 23 | 1,659 | 1,379 | 676 | 703 | 130 | 9 |
-- | Functions to print some common data stuctures in a specific format. This
-- is mostly convenient for playing with Sphinx in the console.
module Akarui.Fmt where
import qualified Data.Text as T
import Data.Map (Map)
import qualified Data.Map as Map
import Data.Set (Set)
import qualified Data.Set as Set
import Akar... | PhDP/Manticore | Akarui/Fmt.hs | apache-2.0 | 1,563 | 0 | 15 | 318 | 585 | 314 | 271 | 20 | 1 |
{-# OPTIONS -fglasgow-exts #-}
-----------------------------------------------------------------------------
{-| Module : QMainWindow.hs
Copyright : (c) David Harley 2010
Project : qtHaskell
Version : 1.1.4
Modified : 2010-09-02 17:02:35
Warning : this file is machine generated - do n... | uduki/hsQt | Qtc/Enums/Gui/QMainWindow.hs | bsd-2-clause | 4,629 | 0 | 18 | 1,003 | 1,210 | 610 | 600 | 112 | 1 |
{-# OPTIONS -fglasgow-exts #-}
-----------------------------------------------------------------------------
{-| Module : QTimeEdit.hs
Copyright : (c) David Harley 2010
Project : qtHaskell
Version : 1.1.4
Modified : 2010-09-02 17:02:14
Warning : this file is machine generated - do not... | uduki/hsQt | Qtc/Gui/QTimeEdit.hs | bsd-2-clause | 46,251 | 0 | 14 | 7,672 | 15,426 | 7,821 | 7,605 | -1 | -1 |
{-
-----------------------------------------------------------------------------
--
-- (c) The University of Glasgow 2001-2003
--
-- Access to system tools: gcc, cp, rm etc
--
-----------------------------------------------------------------------------
-}
{-# LANGUAGE CPP, ScopedTypeVariables #-}
module SysTools (
... | forked-upstream-packages-for-ghcjs/ghc | compiler/main/SysTools.hs | bsd-3-clause | 65,719 | 66 | 22 | 21,930 | 11,577 | 5,903 | 5,674 | 938 | 13 |
module CSE.Plugin
( plugin -- :: Plugin
) where
import CSE.Pass (cseProgram)
import GhcPlugins
plugin :: Plugin
plugin = defaultPlugin {
installCoreToDos = install
}
-- You should probably run this with -fno-cse !
install :: [CommandLineOption] -> [CoreToDo] -> CoreM [CoreToDo]
install _ todos = ... | thoughtpolice/cse-ghc-plugin | CSE/Plugin.hs | bsd-3-clause | 480 | 0 | 10 | 96 | 117 | 65 | 52 | 12 | 1 |
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances, MultiParamTypeClasses, FlexibleContexts #-}
-- The Timber compiler <timber-lang.org>
--
-- Copyright 2008-2009 Johan Nordlander <nordland@csee.ltu.se>
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, ... | UBMLtonGroup/timberc | src/Type2.hs | bsd-3-clause | 16,003 | 0 | 19 | 7,314 | 5,366 | 2,707 | 2,659 | 193 | 4 |
module Main where
import Data.List (isPrefixOf)
import System.Directory
import System.FilePath
import System.FilePath.Find
import Test.DocTest
main :: IO ()
main = do
files <- find always (extension ==? ".hs") "src"
tfiles <- find always (extension ... | zerobuzz/servant | servant/test/Doctests.hs | bsd-3-clause | 1,372 | 0 | 17 | 408 | 366 | 186 | 180 | 36 | 5 |
{-# LANGUAGE PackageImports, LambdaCase, OverloadedStrings #-}
import "GLFW-b" Graphics.UI.GLFW as GLFW
import qualified Data.Map as Map
import qualified Data.Vector as V
import LambdaCube.GL as LambdaCubeGL -- renderer
import LambdaCube.GL.Mesh as LambdaCubeGL
import Codec.Picture as Juicy
import LambdaCube.Compile... | Teaspot-Studio/lambdacube-test | src/Main.hs | bsd-3-clause | 3,745 | 0 | 23 | 1,027 | 934 | 466 | 468 | 71 | 4 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
\section[HsBinds]{Abstract syntax: top-level bindings and signatures}
Datatype for: @BindGroup@, @Bind@, @Sig@, @Bind@.
-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE FlexibleConte... | sgillespie/ghc | compiler/hsSyn/HsBinds.hs | bsd-3-clause | 40,260 | 0 | 18 | 11,774 | 6,345 | 3,426 | 2,919 | 432 | 4 |
module RectangularGame
( rectangularGamecases,
rectangularGame
) where
rectangularGamecases :: Int -> IO [(Integer, Integer)]
rectangularGamecases n
| n <= 0 = return []
| otherwise = do
x_temp <- getLine
let x_t = words x_temp
let x = read $ x_t!!0... | zuoqin/hackerrank | src/RectangularGame.hs | bsd-3-clause | 750 | 0 | 16 | 273 | 311 | 153 | 158 | 21 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Lib where
import Types
import Control.Lens (each, ix, over, set, view)
import qualified Data.Sequence as S
import Data.JSString as JS
import LiveVDom (Message, STMMailbox, modifyMailbox)
-- | Make a Todo item from a title
mkTod... | plow-technologies/live-vdom-todomvc | src/Lib.hs | bsd-3-clause | 2,409 | 0 | 10 | 548 | 734 | 375 | 359 | 42 | 2 |
{-
(c) Galois, 2006
(c) University of Glasgow, 2007
-}
{-# LANGUAGE CPP, NondecreasingIndentation, RecordWildCards #-}
module Coverage (addTicksToBinds, hpcInitCode) where
#ifdef GHCI
import qualified GHCi
import GHCi.RemoteTypes
import Data.Array
import ByteCodeTypes
import GHC.Stack.CCS
#endif
import Type
import H... | oldmanmike/ghc | compiler/deSugar/Coverage.hs | bsd-3-clause | 51,911 | 0 | 25 | 15,412 | 13,549 | 6,850 | 6,699 | 952 | 8 |
{-# LANGUAGE DeriveDataTypeable #-}
module TEST_A where
import Data.Typeable
data Dat = TEST_A deriving (Typeable, Read, Show, Eq, Ord)
| konn/hint-forked | unit-tests/TEST_A.hs | bsd-3-clause | 137 | 0 | 6 | 20 | 40 | 23 | 17 | 4 | 0 |
{-# LANGUAGE FlexibleContexts #-}
module Data.BoolExpr.Parser
(-- * Parsing function
parseBoolExpr
-- * Language definition and components
,languageDef
,lexer
,identifier
,whiteSpace
,symbol
)
where
import Control.Monad
import Data.BoolExpr
import Text.ParserCombinators.Parsec
import qualified Text.... | np/boolexpr | Data/BoolExpr/Parser.hs | bsd-3-clause | 2,727 | 0 | 13 | 893 | 508 | 286 | 222 | 52 | 1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeSynonymInstances #-}
module Mai... | iu-parfunc/AutoObsidian | Applications/PrettyExample/FractalsMain.hs | bsd-3-clause | 3,251 | 0 | 23 | 913 | 941 | 507 | 434 | 82 | 2 |
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE OverloadedStrings #-}
module Huff.Input where
import qualified Data.Set as Set
import Data.String ( IsString(..) )
import qualified Data.Text as T
type Spec a = (Problem,Domain a)
data Problem = Problem { probInit :: [Fact]
, probGoal :... | elliottt/huff | src/Huff/Input.hs | bsd-3-clause | 1,998 | 0 | 10 | 578 | 534 | 298 | 236 | 41 | 1 |
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE Vie... | merijn/lambda-except | AST.hs | bsd-3-clause | 8,143 | 0 | 12 | 2,247 | 3,709 | 1,886 | 1,823 | 231 | 5 |
module HKatalogSpec where
import HKatalog
import Test.Hspec
spec :: Spec
spec = do
describe "Validate haqify function" $ do
it "haqify is supposed to prefix Haq! to things" $
haqify "me" `shouldBe` "Haq! me"
| txominpelu/hkatalog | test/HKatalogSpec.hs | bsd-3-clause | 222 | 0 | 12 | 48 | 51 | 27 | 24 | 8 | 1 |
module Hummus.Runtime where
import Control.Monad
import Control.Monad.CC.Dynvar
import Control.Monad.Trans
import Data.Maybe (catMaybes, isJust)
import qualified Data.HashTable.IO as H
import Hummus.Types
evaluate :: Value ans -> Value ans -> VM ans (Value ans)
evaluate env (Pair a b) = do
x <- evaluate env a
i... | vito/hummus | src/Hummus/Runtime.hs | bsd-3-clause | 2,501 | 0 | 17 | 658 | 1,180 | 566 | 614 | 73 | 7 |
module HSync.Client.Import.NoFoundation( module Import ) where
import ClassyPrelude.Yesod as Import hiding (Update,Query,get,delete,update
, host, port, updateCookieJar
)
import Yesod.Client as Import (MonadYesodClient(..), run... | noinia/hsync-client | src/HSync/Client/Import/NoFoundation.hs | bsd-3-clause | 891 | 0 | 6 | 306 | 161 | 116 | 45 | 14 | 0 |
{-# LANGUAGE OverloadedStrings #-}
module ReadXLSX
where
import Codec.Xlsx
import Codec.Xlsx.Formatted
import Control.Lens ((^?))
import Data.Aeson (Value, encode)
import Data.ByteString.Lazy (ByteString)
import Data.Map (Map)... | stla/jsonxlsx | src/ReadXLSX.hs | bsd-3-clause | 6,351 | 0 | 17 | 1,685 | 1,795 | 908 | 887 | 107 | 3 |
-----------------------------------------------------------------------------
-- |
-- Module : Data.HyperDex.Client
-- Copyright : (c) Aaron Friel 2013
-- License : BSD-style
-- Maintainer : mayreply@aaronfriel.com
-- Stability : maybe
-- Portability : portable
--
-- A client connection based API fo... | AaronFriel/hyhac | src/Database/HyperDex/Client.hs | bsd-3-clause | 1,713 | 0 | 6 | 188 | 231 | 170 | 61 | 15 | 0 |
module SetGame (gameMain) where
import Control.Concurrent (threadDelay)
import Data.List (delete)
import Data.Foldable (traverse_)
import Graphics.Vty as Vty
import System.Random (newStdGen, StdGen)
import Set.Ascii (car... | glguy/set-game | src/SetGame.hs | bsd-3-clause | 12,018 | 0 | 21 | 3,472 | 3,487 | 1,814 | 1,673 | 259 | 11 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TupleSections #-}
module Test.Util.EmbedTree ( Entry(..)
, getFile
, getDirectory
, getEntry
, embedTree
) where
#if... | cdepillabout/ssh | test/Test/Util/EmbedTree.hs | bsd-3-clause | 3,162 | 0 | 20 | 774 | 582 | 330 | 252 | 52 | 3 |
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module TestUtil where
import qualified Data.ByteString as BS
import Data.Maybe (fromJust)
import Test.QuickCheck
import System.FilePath ((</>))
import System.Directory ( getTemporaryDirectory
, createDirectoryIfMiss... | mmhat/h-gpgme | test/TestUtil.hs | mit | 1,648 | 0 | 11 | 372 | 425 | 224 | 201 | 38 | 2 |
module Baum.Binary
( make_quiz
)
where
-- $Id$
import Baum.Binary.Type
import Baum.Binary.Ops
import Baum.Binary.Show
import qualified Tree as T
import qualified Baum.Such.Central
import qualified Baum.Such.Class as C
import Inter.Types
import Autolib.ToDoc
import Data.Typeable
instance C.Such Baum where
em... | florianpilz/autotool | src/Baum/Binary.hs | gpl-2.0 | 768 | 0 | 7 | 157 | 215 | 127 | 88 | -1 | -1 |
-- https://projecteuler.net/problem=4
largestPalindrome :: Int -> Integer
largestPalindrome n = maximum [ x*y | x <-[minNdigitNum..maxNdigitNum], y <- [x..maxNdigitNum], isPalindrome(x*y)]
where
minNdigitNum = 10^(n-1)
maxNdigitNum = 10^(n) - 1
isPalindrome :: Integer -> Bool
isPalindrome n = strN == reverse... | nothiphop/project-euler | 004/solution.hs | apache-2.0 | 407 | 0 | 10 | 69 | 142 | 76 | 66 | 7 | 1 |
{-# LANGUAGE RecordWildCards #-}
module Graphics.GL.Pal.Geometry where
import Graphics.GL.Pal.Types
import Graphics.GL.Pal.ArrayBuffer
import Graphics.GL
import Control.Monad.Trans
geometryFromData :: MonadIO m => GeometryData -> m Geometry
geometryFromData GeometryData{..} = do
geoPositions <- bufferData GL... | lukexi/gl-pal | src/Graphics/GL/Pal/Geometry.hs | bsd-3-clause | 654 | 0 | 11 | 123 | 152 | 76 | 76 | 15 | 1 |
module HLearn.Models.Regression.PowerLaw
( PowerLaw
)
where
import Control.DeepSeq
import HLearn.Algebra
import HLearn.Models.Classifiers.Common
import HLearn.Evaluation.RSquared
import HLearn.Models.Regression.Common
-------------------------------------------------------------------------------
-- data... | ehlemur/HLearn | src/HLearn/Models/Regression/PowerLaw.hs | bsd-3-clause | 3,134 | 0 | 14 | 938 | 1,083 | 580 | 503 | -1 | -1 |
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE FlexibleContexts #-}
import Control.CP.FD.Example
model :: ExampleModel (ModelInt,ModelInt,ModelInt,ModelInt)
model (v,q,l,d) = do
let n = q*l
let nseqpair = (v*(v-1)) `div` 2
exists $ \c -> do
size c @= n*v
c `allin` (cte 1,q)
let el ro co = c ! (ro*n+co)
... | neothemachine/monadiccp | examples/EFPA.hs | bsd-3-clause | 685 | 0 | 28 | 177 | 423 | 221 | 202 | 19 | 1 |
module Dotnet.System.Array where
import Dotnet
import qualified Dotnet.System.Object
data Array_ a
type Array elt = Dotnet.System.Object.Object (Array_ elt)
isFixedSize :: Array elt -> IO Bool
isFixedSize = invoke "get_IsFixedSize" ()
isReadOnly :: Array elt -> IO Bool
isReadOnly = invoke "get_IsReadOnly" ()
isSy... | FranklinChen/Hugs | dotnet/lib/Dotnet/System/Array.hs | bsd-3-clause | 639 | 0 | 8 | 109 | 216 | 111 | 105 | -1 | -1 |
{-# LANGUAGE DeriveDataTypeable #-}
-- | IO actions that might be put in a package at some point.
module Path.IO
(getWorkingDir
,listDirectory
,resolveDir
,resolveFile
,resolveDirMaybe
,resolveFileMaybe
,ResolveException(..)
,removeFileIfExists
,removeTree
,removeTreeIfExists
,fileExists
,rena... | CRogers/stack | src/Path/IO.hs | bsd-3-clause | 8,796 | 0 | 22 | 2,876 | 2,066 | 1,044 | 1,022 | 183 | 5 |
{-# LANGUAGE OverloadedStrings #-}
module Database.Persist.Sql.Util (
parseEntityValues
, entityColumnNames
, keyAndEntityColumnNames
, entityColumnCount
, isIdField
, hasCompositeKey
, dbIdColumns
, dbIdColumnsEsc
, dbColumns
) where
import Data.Maybe (isJust)
import Data.Monoid ((<>))
import Data... | nakaji-dayo/persistent | persistent/Database/Persist/Sql/Util.hs | mit | 3,188 | 0 | 17 | 749 | 914 | 475 | 439 | 70 | 7 |
module ListIn2 where
f :: [Int] -> Int
f [42,56] = 11
| SAdams601/HaRe | old/testing/simplifyExpr/ListIn2_TokOut.hs | bsd-3-clause | 60 | 0 | 6 | 18 | 30 | 18 | 12 | 3 | 1 |
{-# LANGUAGE Unsafe #-}
{-# LANGUAGE CPP, NoImplicitPrelude #-}
{-# OPTIONS_GHC -Wno-missing-signatures #-}
{-# OPTIONS_HADDOCK not-home #-}
-----------------------------------------------------------------------------
-- |
-- Module : GHC.Conc
-- Copyright : (c) The University of Glasgow, 1994-2002
-- Licens... | shlevy/ghc | libraries/base/GHC/Conc.hs | bsd-3-clause | 2,902 | 0 | 5 | 893 | 300 | 213 | 87 | 65 | 0 |
-- | Manage all file operations like listing files with fileListenInfoIncludes and exclude patterns
-- and file filtering
module Shaker.Io
(
-- * Utility functions
getCorrespondingBuildFile
-- * List files functions
,listModifiedAndCreatedFiles
,listFiles
,getCurrentFpCl
,recurseMultipleListFiles
,recurseListF... | bonnefoa/Shaker | src/Shaker/Io.hs | isc | 5,114 | 0 | 13 | 864 | 1,270 | 661 | 609 | 90 | 2 |
module Common.Shader
( ShaderRequest (..)
, loadShaders
) where
import Control.Exception (bracketOnError)
import Control.Monad ((<=<), unless)
import qualified Data.ByteString as BS
import Graphics.Rendering.OpenGL
data ShaderRequest = ShaderRequest !ShaderType !FilePath
deriving Show
... | kosmoskatten/opengl-tutorial | src/Common/Shader.hs | mit | 1,224 | 0 | 12 | 272 | 374 | 188 | 186 | 38 | 1 |
module Magento.Helper (
addHelper
) where
import Control.Monad (when)
import System.Directory (createDirectoryIfMissing, doesFileExist)
import System.FilePath.Posix (joinPath, takeDirectory)
import Template.Helper (helperXml, helperPhp)
import Magento.Module.Path (helperBasePath)
import Magento.Module (
Module... | prasmussen/magmod | Magento/Helper.hs | mit | 2,121 | 0 | 11 | 416 | 575 | 294 | 281 | 57 | 1 |
import Test.HUnit
import Data.Text
import Data.Tree
import NewickParser
import NewickDumper
-- If I parse a Newick string into a tree, then dump that tree to Newick
-- again, I should obtain the same string, i.e dump(parse(nw)) == nw, or IOW
-- (dump . parse) == id. I test this on a few Newick strings below (of c... | tjunier/mlgsc | test/TestNewick.hs | mit | 2,137 | 0 | 9 | 386 | 355 | 193 | 162 | 34 | 1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE UndecidableInstances #-}
module Data.Square where
import Control.Applicative
import Data.Coerce.Utils
import Data.Sequence.RightPerfect
import qualified Data.Square.BinarySize as Binary
import Numeric.Binary
newtype Square... | oisdk/Square | src/Data/Square.hs | mit | 1,379 | 0 | 12 | 305 | 531 | 276 | 255 | -1 | -1 |
module Data.Json.Schema
(
module Data.Json.Schema.Types
, module Data.Json.Schema.Validation
) where
import Data.Json.Schema.Types
import Data.Json.Schema.Validation | benweitzman/quick-schema | src/Data/Json/Schema.hs | mit | 184 | 0 | 5 | 32 | 39 | 28 | 11 | 6 | 0 |
module Main
( main
) where
import ProC.Interpreter
import ProC.Parser
import System.Environment
main :: IO ()
main = do
inputFile <- head <$> getArgs
input <- readFile inputFile
prog <- parseProC input
case prog of
(Left e) -> print e
(Right p) -> runProC p
| ianagbip1oti/ProC | bin/Interpreter.hs | mit | 312 | 0 | 11 | 99 | 107 | 53 | 54 | 13 | 2 |
-- | Data.TSTP.Quant module
{-# LANGUAGE UnicodeSyntax #-}
module Data.TSTP.Quant where
-- | Quantifier specification.
data Quant = All -- ^ ∀
| Exists -- ^ ∃
deriving (Eq, Ord, Show, Read)
| agomezl/tstp2agda | src/Data/TSTP/Quant.hs | mit | 232 | 0 | 6 | 69 | 41 | 26 | 15 | 5 | 0 |
{-# LANGUAGE OverloadedStrings, DeriveGeneric, TemplateHaskell #-}
-- | A detail document for relays
module Onionhoo.Detail.Relay (Relay) where
import Data.Text (Text)
import Data.Aeson
import Data.Aeson.Types
import Data.Aeson.TH
import GHC.Generics
-- | Contains detail information for a relay
data Relay =
Relay ... | baumanno/onionhoo | src/Onionhoo/Detail/Relay.hs | mit | 1,865 | 0 | 10 | 526 | 450 | 261 | 189 | 50 | 0 |
{-# LANGUAGE QuasiQuotes, TemplateHaskell #-}
module MyParser.AMPLParserMeta where
import Language.LBNF.Compiletime
import Language.LBNF(lbnf, dumpCode, bnfc)
{-
To use BNFC-Meta first develop your bnfc grammar, and then do the following:
bnfc [lbnf|
grammar
|]
This will generate via template haskell the code f... | prashant007/AMPL | myAMPL/src/MyParser/AMPLParserMeta.hs | mit | 4,721 | 0 | 5 | 907 | 40 | 26 | 14 | 5 | 0 |
module Problem29 where
{--
Task description:
Consider all integer combinations of ab for 2 ≤ a ≤ 5 and 2 ≤ b ≤ 5:
22=4, 23=8, 24=16, 25=32
32=9, 33=27, 34=81, 35=243
42=16, 43=64, 44=256, 45=1024
52=25, 53=125, 54=625, 55=3125
If they are then placed in numerical order, with any repeats removed, we get t... | runjak/projectEuler | src/Problem29.hs | mit | 653 | 0 | 7 | 141 | 64 | 36 | 28 | 5 | 1 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE NoStarIsType #-}
module TH_unresolvedInfix_Lib where
import Language.Haskell.TH
import Language.Haskell.TH.Lib
import Language.Haskell.TH.Quote
infixl 6 :+
infixl 7 :*
data Tree = N
| Tree :+ Tree
| Tree :* Tree
-- custom instance, ... | ghcjs/ghcjs | test/ghc/th/TH_unresolvedInfix_Lib.hs | mit | 2,681 | 21 | 16 | 667 | 1,052 | 565 | 487 | 65 | 1 |
-- Joe Jevnik
-- 24.11.2013
-- polls the server for new messages and acts accordingly.
import Control.Applicative ((<$>))
import Control.Concurrent (forkIO,threadDelay)
import Control.Monad (when,unless,void)
import Control.Monad.Trans (liftIO)
import Data.List ... | llllllllll/locking_mech | src/Main.hs | gpl-2.0 | 6,726 | 0 | 17 | 2,299 | 1,512 | 786 | 726 | 123 | 3 |
{-| Utility function for detecting the death of a job holding resources
To clean up resources owned by jobs that die for some reason, we need
to detect whether a job is still alive. As we have no control over PID
reuse, our approach is that each requester for a resource has to provide
a file where it owns an exclusive... | ribag/ganeti-experiments | src/Ganeti/WConfd/DeathDetection.hs | gpl-2.0 | 2,607 | 0 | 20 | 492 | 333 | 175 | 158 | 33 | 1 |
-- | Simple vertice list based representation of DAGs and some common operations on it.
module Data.DAG.Simple (
toposort
, reachableSet
, cyclic
) where
import Data.List
import qualified Data.Set as S
import Control.Basics
import Control.Monad.Writer
-- | Produce a topological sorting of the given relati... | meiersi/scyther-proof | src/Data/DAG/Simple.hs | gpl-3.0 | 1,772 | 0 | 12 | 523 | 585 | 304 | 281 | 37 | 1 |
module HLex
( Token(..)
, Name
, Rule
, LexResult
, hlex
, mkRule
) where
import Control.Monad.Identity
import Control.Monad.Reader
import Control.Monad.State
import Text.Regex
type Index = Int
type Name = String
type Rule = (Name, Regex)
data Token = Token Name String deriving (Show)
endToken :: Token
endToken = T... | cbowdon/TDOP | hlex.hs | gpl-3.0 | 1,815 | 0 | 15 | 586 | 728 | 386 | 342 | 49 | 8 |
module ErlangWriter (
render
) where
import ModuleParser (DataType(..), Param(..), ModuleDef(..))
import ListManip (strToLower, allButLast)
import Control.Monad.Writer (Writer, execWriter, tell)
import Control.Monad (mapM_)
type StringWriter = Writer String ()
-- | Wrap the Writer monad
render :: [ModuleDef] -> ... | SneakingCat/proper-play-gen | src/ErlangWriter.hs | gpl-3.0 | 4,338 | 0 | 11 | 976 | 1,129 | 575 | 554 | 99 | 3 |
module Development.Hake.OldFunSet (
file
, task
, rule
, ruleSS
) where
import Data.List (isSuffixOf)
import Data.Function.Tools (const2)
import Development.Hake.Types (Rule, getSrcs)
import Development.Hake.Tools (changeSuffix, systemE)
file :: ( [String], [String], [Stri... | YoshikuniJujo/hake_haskell | Development/Hake/OldFunSet.hs | gpl-3.0 | 1,120 | 4 | 16 | 302 | 482 | 273 | 209 | 27 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-deploymentmanager/gen/Network/Google/Resource/DeploymentManager/Operations/Get.hs | mpl-2.0 | 5,097 | 0 | 20 | 1,265 | 794 | 462 | 332 | 117 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- |
-- Module : Network.Google.Dataproc.Ty... | rueshyna/gogol | gogol-dataproc/gen/Network/Google/Dataproc/Types/Product.hs | mpl-2.0 | 130,218 | 0 | 24 | 30,563 | 22,232 | 12,843 | 9,389 | 2,460 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-containerbuilder/gen/Network/Google/Resource/Cloudbuild/Projects/Locations/Triggers/Patch.hs | mpl-2.0 | 6,490 | 0 | 18 | 1,437 | 940 | 547 | 393 | 138 | 1 |
{-# LANGUAGE FunctionalDependencies, MultiParamTypeClasses #-}
{-
Copyright (C) 2010, 2011, 2012 Jeroen Ketema and Jakob Grue Simonsen
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either ve... | jeroenk/iTRSsImplemented | SystemOfNotation.hs | agpl-3.0 | 4,411 | 0 | 12 | 1,010 | 560 | 324 | 236 | 50 | 0 |
{-# LANGUAGE OverloadedStrings #-}
module View.Email
( emailNewlyAuthorized
) where
import Control.Monad (void)
import qualified Text.Blaze.Html5 as H
import qualified Text.Blaze.Html5.Attributes as HA
import View.Template
emailTemplate :: H.Html -> H.Html
emailTemplate content = H.docTypeHtml $ do
H.head $
... | databrary/databrary | src/View/Email.hs | agpl-3.0 | 3,554 | 0 | 20 | 833 | 498 | 227 | 271 | 60 | 1 |
-- This file is part of purebred
-- Copyright (C) 2017-2021 Róman Joost and Fraser Tweedale
--
-- purebred is free software: you can redistribute it and/or modify
-- it under the terms of the GNU Affero General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at yo... | purebred-mua/purebred | src/Purebred/Config.hs | agpl-3.0 | 12,008 | 0 | 18 | 2,112 | 2,224 | 1,338 | 886 | 232 | 3 |
{- |
Module : Test.HUnit.Tools
Copyright : Copyright (C) 2004-2010 John Goerzen
License : GNU LGPL, version 2 or above
Maintainer : John Goerzen <jgoerzen@complete.org>
Stability : provisional
Portability: portable
Utilities for HUnit unit testing.
Written by John Goerzen, jgoerzen\@comple... | jgoerzen/testpack | src/Test/HUnit/Tools.hs | lgpl-2.1 | 12,459 | 0 | 20 | 4,370 | 2,277 | 1,212 | 1,065 | 142 | 7 |
{-
Author: Christian Sternagel <c.sternagel@gmail.com> (2009-2015, 2017)
Author: René Thiemann <rene.thiemann@uibk.ac.at> (2009-2014)
Author: Akihisa Yamada <akihisa.yamada@uibk.ac.at> (2017)
License: LGPL (see file COPYING.LESSER)
-}
module Main (main) where
import Ceta -- the certifier
import System.Environment -... | jwaldmann/ceta-postproc | CeTA-2.39/generated/Haskell/Main.hs | lgpl-3.0 | 1,818 | 0 | 14 | 451 | 383 | 182 | 201 | 33 | 3 |
{-# LANGUAGE Safe #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-|
Module : Data.PolyMap.Storage.Set
Copyright : (c) 2015 David Farrell
License : PublicDomain
Stability : unstable
Portability : non-portable (GHC extensions)
Storage instance for sets.
-}
modul... | shockkolate/hs-polymap | src/Data/PolyMap/Storage/Set.hs | unlicense | 746 | 0 | 11 | 183 | 138 | 73 | 65 | 13 | 0 |
-- Copyright 2016 TensorFlow authors.
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agree... | jcberentsen/haskell | tensorflow-ops/tests/EmbeddingOpsTest.hs | apache-2.0 | 7,363 | 0 | 18 | 1,853 | 1,770 | 950 | 820 | 120 | 1 |
{-
CS 386L Programming Assignment (HW 6)
yufeng@cs.utexas.edu
Implement type inference for a language with
* variables, lambda functions, application
* let binding
* integers, boolean, binary integer & boolean operators
* recursive values declaration
Implement Let polymorphism, using the algorithm... | fredfeng/HaskellCodes | hw6.hs | apache-2.0 | 15,992 | 0 | 24 | 6,633 | 5,785 | 3,063 | 2,722 | 270 | 11 |
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE DeriveFunctor #-}
-- | A pedestrian implementation of a directed acyclic graph.
-- Sharing is explicitely represented by using node-level and
-- edge-level identifiers.
-- The module may be convenient to use if your data structure
-- doesn't change often.
--
-- Note: many... | kawu/pedestrian-dag | src/Data/DAG_Backup.hs | bsd-2-clause | 6,849 | 0 | 15 | 1,592 | 1,767 | 959 | 808 | 111 | 2 |
module Model.User where
import Model.Persist
import Data.Maybe (fromMaybe)
import Data.Text (Text)
userCalcName :: User -> Text
userCalcName u = fromMaybe (userIdent u) (userNick u)
| dtekcth/DtekPortalen | src/Model/User.hs | bsd-2-clause | 184 | 0 | 7 | 26 | 65 | 36 | 29 | 6 | 1 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE ViewPatterns #-}
-- | Scrobbler networking. Connects different scrobblers in chain
--
-- Supports optional encryption
module Control.Scrobbler.Network
( -- * Networking
NetworkSettings(..)
, Failures(..)
, defaultNetworkSettings
, ... | supki/scrobblers | src/Control/Scrobbler/Network.hs | bsd-2-clause | 3,338 | 0 | 19 | 776 | 1,003 | 551 | 452 | 78 | 4 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE CPP #-}
module View
( viewState
, viewQuestion
, viewContext
, viewSuggestion
, viewMessage
) where
import Brick
import Brick.Widgets.List
import Brick.Widgets.WrappedText
import Data.Semigroup ((<>))
import ... | rootzlevel/hledger-add | src/View.hs | bsd-3-clause | 2,777 | 0 | 9 | 549 | 730 | 382 | 348 | 58 | 2 |
{-# LANGUAGE TemplateHaskell, OverloadedStrings #-}
module Haskcord.EventLoop
where
import Control.Concurrent
import Control.Concurrent.MVar
import Control.Lens
import Control.Monad
import Control.Monad.Except
import Data.Aeson
import qualified Data.ByteString.Lazy as BL
import qualified Data.HashMap.Strict as H
impor... | swagcod/haskcord | src/Haskcord/EventLoop.hs | bsd-3-clause | 4,615 | 0 | 21 | 1,122 | 1,237 | 627 | 610 | 99 | 4 |
{- Considering 10-digit primes containing repeated digits it is clear that they cannot all be the same: 1111 is divisible by 11, 2222 is divisible by 22, and so on. But there are nine 10-digit primes containing three ones:
1117, 1151, 1171, 1181, 1511, 1811, 2111, 10111, 8111
We shall say that M(n, d) represents the ... | bgwines/project-euler | src/solved/problem111.hs | bsd-3-clause | 3,160 | 22 | 19 | 672 | 884 | 502 | 382 | 70 | 2 |
{-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE FlexibleContexts ... | jfischoff/simple-poly | src/Language/SimplePoly/Abstract.hs | bsd-3-clause | 2,492 | 0 | 11 | 638 | 550 | 291 | 259 | -1 | -1 |
{-# LANGUAGE PatternSynonyms #-}
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.ARB.MapBufferAlignment
-- Copyright : (c) Sven Panne 2019
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- Porta... | haskell-opengl/OpenGLRaw | src/Graphics/GL/ARB/MapBufferAlignment.hs | bsd-3-clause | 679 | 0 | 5 | 91 | 47 | 36 | 11 | 7 | 0 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TupleSections #-}
module Language.Haskell.Liquid.Spec (
-- * Produce Module GhcSpec
makeGhcSpec
-- * Post-Process GhcSpec
, postProcess
) where
import GHC hiding (Located)
import Annotations
import CoreSyn
import DynFlag... | spinda/liquidhaskell | src/Language/Haskell/Liquid/Spec.hs | bsd-3-clause | 4,867 | 0 | 19 | 977 | 1,187 | 625 | 562 | 100 | 2 |
module GHC.Hs.Expr (module HsExpr) where
import HsExpr
| google/ghc-source-gen | compat/GHC/Hs/Expr.hs | bsd-3-clause | 55 | 0 | 4 | 7 | 16 | 11 | 5 | 2 | 0 |
{-# LANGUAGE DeriveGeneric #-}
module Catan.Types where
import Data.Map (Map)
import GHC.Generics (Generic)
import Types (ID)
import Grid (Hex,Vertex,Edge)
data Catan = Catan
{ game_board :: Board
, game_data :: [PlayerData]
, game_turn :: Player }
deriving (Show, Eq, Generic)
data PlayerData ... | hherman1/CatanServ | src/Catan/Types.hs | bsd-3-clause | 1,418 | 0 | 9 | 379 | 430 | 255 | 175 | 42 | 0 |
{-# LANGUAGE Rank2Types #-}
--------------------------------------------------------------------------------
-- |
-- Module : Data.Graph
-- Copyright : (C) 2016 Yorick Laupa
-- License : (see the file LICENSE)
--
-- Maintainer : Yorick Laupa <yo.eight@gmail.com>
-- Stability : provisional
-- Portability : non-portable
... | YoEight/graph-hs | src/Data/Graph.hs | bsd-3-clause | 5,589 | 0 | 21 | 1,456 | 1,417 | 731 | 686 | 109 | 6 |
module Sound.Data.Onset where
import Control.DeepSeq
import Sound.Data.Stream
import qualified Data.Sequence as S
-- | A single onset with two values.
-- [@]frame[@] which is the frame number of
-- where the onset happens. The real time
-- in the stream where this occurs is
-- determined by (sampleRate/ff... | Smurf/Tempoist | src/Sound/Data/Onset.hs | bsd-3-clause | 1,170 | 0 | 8 | 312 | 154 | 100 | 54 | 14 | 0 |
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE RecursiveDo #-}
{-# LANGUAGE ScopedTypeVaria... | manyoo/reflex-dom | src/Reflex/Dom/Internal.hs | bsd-3-clause | 5,576 | 0 | 24 | 959 | 1,626 | 824 | 802 | 108 | 1 |
{-# LANGUAGE OverloadedStrings #-}
-- | Visualize graph structure.
module Web.Lightning.Plots.Graph
(
GraphPlot(..)
, Visualization (..)
, graphPlot
)
where
--------------------------------------------------------------------------------
import Control.Monad.Reader
import Data.Aeson... | cmoresid/lightning-haskell | src/Web/Lightning/Plots/Graph.hs | bsd-3-clause | 3,653 | 0 | 11 | 1,278 | 666 | 374 | 292 | 58 | 1 |
{-# LANGUAGE OverloadedStrings,FlexibleContexts,TypeFamilies #-}
import Control.Applicative
import Control.Arrow ((&&&))
import Control.Lens hiding ((|>))
import Control.Monad (liftM,void)
import Control.Monad.Primitive.... | cmahon/backtests | backtests.hs | bsd-3-clause | 7,277 | 0 | 20 | 1,823 | 2,494 | 1,335 | 1,159 | 136 | 1 |
-- © 2002 Peter Thiemann
module WASH.CGI.EventHandlers where
import WASH.CGI.HTMLWrapper
--abort
onAbort :: Monad m => String -> WithHTML x m ()
onAbort = attr_SS "onabort"
-- ^The user aborts the loading of an image (for example by clicking a link or
-- clicking the Stop button).
--blur
onBlur :: Monad m => String... | nh2/WashNGo | WASH/CGI/EventHandlers.hs | bsd-3-clause | 3,881 | 0 | 8 | 724 | 874 | 455 | 419 | 50 | 1 |
{-|
Module : Database.Relational.Select
Description : Definition of SELECT.
Copyright : (c) Alexander Vieth, 2015
Licence : BSD3
Maintainer : aovieth@gmail.com
Stability : experimental
Portability : non-portable (GHC only)
-}
{-# LANGUAGE AutoDeriveTypeable #-}
{-# LANGUAGE PolyKinds #-}
module Database... | avieth/Relational | Database/Relational/Select.hs | bsd-3-clause | 440 | 0 | 6 | 81 | 32 | 22 | 10 | 5 | 0 |
module Part2.Problem56 where
import Part1.Problem32 (digits)
--
-- Problem 56: Powerful digit sum
--
-- A googol (10^100) is a massive number: one followed by one-hundred zeros;
-- 100^100 is almost unimaginably large: one followed by two-hundred zeros.
-- Despite their size, the sum of the digits in each n... | c0deaddict/project-euler | src/Part2/Problem56.hs | bsd-3-clause | 542 | 0 | 10 | 115 | 81 | 49 | 32 | 7 | 1 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Risk where
import Control.Monad (replicateM)
import Control.Monad.Random
import Data.List (sortBy)
------------------------------------------------------------
-- Die values
newtype DieValue = DV { unDV :: Int }
deriving (Eq, Ord, Show, Num)
first :: (a -> b) -... | kemskems/cis194-spring13 | src/HW12/Risk.hs | bsd-3-clause | 2,138 | 0 | 16 | 531 | 743 | 392 | 351 | 40 | 1 |
{-
Problem 99
Decyphering passwords by topological sorting
Result
73162890
0.04 s
Comment
It is sufficient to compare the logs of the values, as log preserves
order.
-}
module Problem79 (solution) where
import CommonFunctions
import Data.L... | quchen/HaskellEuler | src/Problem79.hs | bsd-3-clause | 2,394 | 0 | 10 | 779 | 529 | 310 | 219 | 26 | 1 |
{-# LANGUAGE TupleSections #-}
module Language.MovDBz.FromBrainfuck (compileBF, layout, initialMemory) where
import Language.Brainfuck.Syntax as BF
import Language.MovDBz.Syntax as MOVDBZ
import Data.Word
import Control.Monad.State
import Control.Monad.Reader
import Control.Applicative
import Control.Arrow
import Dat... | gergoerdi/brainfuck | language-movdbz/src/Language/MovDBz/FromBrainfuck.hs | bsd-3-clause | 7,664 | 0 | 19 | 2,342 | 2,545 | 1,318 | 1,227 | 158 | 8 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Mental.Infer where
#define DEBUG_INFER 1
im... | romac/mental | src/Mental/Infer.hs | bsd-3-clause | 7,739 | 175 | 15 | 2,416 | 2,523 | 1,327 | 1,196 | 227 | 22 |
module Sixteen where
import Data.List (find)
import Data.Maybe (fromJust)
import Text.Parsec hiding (State)
import Text.Parsec.String
data Attribute = Attr { attrName :: String
, attrValue :: Int }
deriving Eq
... | purcell/adventofcodeteam | app/Sixteen.hs | bsd-3-clause | 2,079 | 0 | 15 | 645 | 681 | 362 | 319 | 46 | 5 |
{-# OPTIONS_HADDOCK hide #-}
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.Functions.F06
-- Copyright : (c) Sven Panne 2019
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- Portability : por... | haskell-opengl/OpenGLRaw | src/Graphics/GL/Functions/F06.hs | bsd-3-clause | 69,374 | 0 | 19 | 9,174 | 11,138 | 5,784 | 5,354 | 1,145 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.