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 Language.SpirV.Magic where
import Data.Word (Word32)
magic :: Word32
magic = 0x7230203
| expipiplus1/spir-v | Language/SpirV/Magic.hs | mit | 96 | 0 | 5 | 14 | 27 | 17 | 10 | 4 | 1 |
module Solution where
import Data.List
import Data.Ord
import Data.Array
readInt :: String -> Int
readInt = read
data Tree a = EmptyTree | Node a (Tree a) (Tree a) deriving (Show, Read, Eq)
singleton :: a -> Tree a
singleton x = Node x EmptyTree EmptyTree
treeInsert x EmptyTree = singleton x
treeInsert x (Node a le... | venugangireddy/Lambdajudge | test/contest1/Q1/Solution/Solution.hs | mit | 1,841 | 0 | 14 | 532 | 831 | 412 | 419 | 41 | 3 |
-- |
-- Module: Parser.MessgeDesc
-- Copyright: (c) 2015-2016 Martijn Rijkeboer <mrr@sru-systems.com>
-- License: MIT
-- Maintainer: Martijn Rijkeboer <mrr@sru-systems.com>
--
-- Message Descriptor type and functions.
module Parser.MessageDesc
( MessageDesc
, new
, getName
, addField
, ... | sru-systems/protobuf-simple | src/Parser/MessageDesc.hs | mit | 2,267 | 0 | 10 | 420 | 575 | 330 | 245 | 50 | 1 |
module GitDirHistory
where
import System.IO
import System.Directory (doesFileExist, createDirectoryIfMissing, removeFile)
import Alfred
import System.Process (readProcess, runInteractiveProcess, waitForProcess)
import System.Exit
import Control.Applicative
import Control.DeepSeq (deepseq)
type History = [Stri... | yamamotoj/alfred-git-workflow | src/GitDirHistory.hs | mit | 1,659 | 0 | 13 | 410 | 569 | 274 | 295 | 59 | 2 |
import qualified Data.List as L
quicksort :: (Ord a) => [a] -> [a]
quicksort [] = []
quicksort (pivot:other) = left ++ [pivot] ++ right
where
left = quicksort (filter (<= pivot) other)
right = quicksort (filter (> pivot) other)
me... | jni/learn-you-a-haskell | sorting.hs | mit | 829 | 0 | 11 | 344 | 386 | 205 | 181 | 19 | 3 |
module Language.PureScript.Make.Lua (
buildMakeActions
) where
import qualified Data.ByteString.Lazy as BS
import qualified Data.Map.Strict as M
import Data.Foldable (for_)
import Data.Maybe (fromMaybe)
import Data.String (fromString)
import... | raymoo/psc-lua-redux | src/Language/PureScript/Make/Lua.hs | mit | 4,853 | 0 | 18 | 1,231 | 1,363 | 693 | 670 | 101 | 2 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE PatternGuards #-}
module Network.Wai.Handler.Warp.HTTP2.Receiver (frameReceiver) where
#if __GLASGOW_HASKELL__ < 709
import Control.Applicative
#endif
import Control.Concurrent.STM
import... | iquiw/wai | warp/Network/Wai/Handler/Warp/HTTP2/Receiver.hs | mit | 14,592 | 0 | 28 | 4,746 | 3,709 | 1,755 | 1,954 | 283 | 18 |
module FindPalindromes
where
-- | All possible ways to choose @k@ elements from a list, without
-- repetitions. \"Antisymmetric power\" for lists. Synonym for 'kSublists'.
choose :: Int -> [a] -> [[a]]
choose 0 _ = [[]]
choose k [] = []
choose k (x:xs) = map (x:) (choose (k-1) xs) ++ choose k xs
-- | \"Tensor powe... | akaihola/palindromi-haskell | src/FindPalindromes.hs | mit | 1,211 | 0 | 12 | 245 | 388 | 206 | 182 | 19 | 1 |
-- Tema_9.hs
-- Tema 9: Declaración de tipos y clases.
-- José A. Alonso Jiménez https://jaalonso.github.com
-- =====================================================================
module Tema_9 where
import Data.List (nub)
-- ---------------------------------------------------------------------
-- Declaraciones de... | jaalonso/I1M-Cod-Temas | src/Tema_9.hs | gpl-2.0 | 11,670 | 0 | 11 | 3,000 | 2,283 | 1,264 | 1,019 | 129 | 1 |
{-# LANGUAGE DeriveTraversable, FlexibleContexts, FlexibleInstances, OverloadedStrings #-}
module Model.Expression ( -- *Types
Expression
, Node(..)
, Formula
, BinaryOp
, UnaryOp
... | jvilar/hrows | lib/Model/Expression.hs | gpl-2.0 | 9,655 | 0 | 16 | 3,634 | 2,862 | 1,541 | 1,321 | 176 | 14 |
module Tree(Tree,cond,cons,left,right,value,visualize)
where
import Data.List(intercalate)
data Tree = Tree Bool Tree Tree
cons :: Bool -> Tree -> Tree -> Tree
cons = Tree
left :: Tree -> Tree
left (Tree _ l _) = l
right :: Tree -> Tree
right (Tree _ _ r) = r
cond :: Tree -> Tree -> Tree -> Tree
cond (Tree v _ _)... | qpliu/esolang | beets/hs/Tree.hs | gpl-3.0 | 724 | 0 | 11 | 179 | 386 | 203 | 183 | 21 | 2 |
module Main (
main,
lookupHandlerServer
) where
-- we want an executable so we'll re-export some stuff from the Server library
import Server
| RocketPuppy/PupCollide | Server/Main.hs | gpl-3.0 | 154 | 0 | 4 | 36 | 16 | 11 | 5 | 4 | 0 |
module Export20 where
import ExportBasic6
correct :: Bool
correct = t1 t2
where
t2 :: Listt6 Int
t2 = 5 :> Empty
t1 :: Listt6 Int -> Bool
t1 (5 :> _) = True
t1 _ = False
main :: Bool
main = correct | Helium4Haskell/helium | test/exports/Export20.hs | gpl-3.0 | 262 | 0 | 9 | 108 | 84 | 46 | 38 | 11 | 2 |
{-# LANGUAGE NoImplicitPrelude, RecordWildCards, OverloadedStrings, PatternGuards #-}
module Lamdu.GUI.ExpressionEdit.BinderEdit
( make, diveToNameEdit
, Parts(..), makeParts
) where
import Control.Applicative ((<|>))
import qualified Control.Lens as Lens
import Control.Lens.Operators
i... | rvion/lamdu | Lamdu/GUI/ExpressionEdit/BinderEdit.hs | gpl-3.0 | 20,142 | 0 | 22 | 5,977 | 5,006 | 2,598 | 2,408 | -1 | -1 |
f :: String -> Tree Int | hmemcpy/milewski-ctfp-pdf | src/content/3.11/code/haskell/snippet02.hs | gpl-3.0 | 23 | 0 | 6 | 5 | 16 | 7 | 9 | 1 | 0 |
module GGen.Types ( Exposure (..)
, Slice
, InfillRatio
, Angle
, module GGen.ToolPath.Types
) where
import GGen.Geometry.Types
import GGen.ToolPath.Types
-- | Is a polygon facing the outside world or internal to the obje... | bgamari/GGen | GGen/Types.hs | gpl-3.0 | 605 | 0 | 8 | 188 | 104 | 68 | 36 | 11 | 0 |
#!/usr/bin/env stack
{- stack script
--compile
--copy-bins
--resolver lts-14.17
-}
main :: IO ()
main = putStrLn "hello world!!! :) "
| adamwespiser/wespiser.com | my-site/drafts/hello.hs | gpl-3.0 | 137 | 0 | 6 | 24 | 21 | 11 | 10 | 2 | 1 |
-- Sortable Test
-- Copyright (C) 2015 Jonathan Lamothe
-- <jonathan@jlamothe.net>
-- This program is free software: you can redistribute it and/or
-- modify it under the terms of the GNU General Public License as
-- published by the Free Software Foundation, either version 3 of the
-- License, or (at your option) any... | jlamothe/sortable-test | daily-summary.hs | gpl-3.0 | 820 | 0 | 6 | 146 | 45 | 32 | 13 | 4 | 1 |
module Lamdu.GUI.WidgetIds
( module Lamdu.GUI.WidgetIds
, module Lamdu.GUI.WidgetIdIRef
) where
import Data.UUID.Types (UUID)
import qualified Data.UUID.Utils as UUIDUtils
import GUI.Momentu.Widget.Id (Id(..))
import qualified GUI.Momentu.Widget.Id as WidgetId
import Lamdu.GUI... | lamdu/lamdu | src/Lamdu/GUI/WidgetIds.hs | gpl-3.0 | 1,266 | 0 | 8 | 219 | 363 | 222 | 141 | 35 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Database.Design.Ampersand.Output.Population2Xlsx
(fSpec2PopulationXlsx)
where
import Database.Design.Ampersand.FSpec
import Database.Design.Ampersand.Basics
import Database.Design.Ampersand.Core.AbstractSyntaxTree
import System.Time
import qualified Data.Map as M
import Codec... | guoy34/ampersand | src/Database/Design/Ampersand/Output/Population2Xlsx.hs | gpl-3.0 | 4,565 | 1 | 24 | 1,909 | 1,011 | 532 | 479 | 75 | 15 |
{-
This source file is a part of the noisefunge programming environment.
Copyright (C) 2015 Rev. Johnny Healey <rev.null@gmail.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation... | wolfspyre/noisefunge | src/Language/NoiseFunge/Befunge/VM.hs | gpl-3.0 | 14,359 | 10 | 19 | 4,634 | 6,015 | 3,051 | 2,964 | -1 | -1 |
module Exercices where
import Data.List
import Data.Char
import Data.Tuple (swap)
-- RECURSION AND LIST I
factN 0 = 1
factN n = factN (n-1) *n
fact 0 = 1
fact n = product [1..n]
doublefactorial 0 = 1
doublefactorial 1 = 1
doublefactorial n = doublefactorial (n-2) * n
plusOne = (+)1
addition x 0 = x
addition x y = ... | knotman90/google-interview | haskell/wikibook.hs | gpl-3.0 | 8,457 | 0 | 12 | 2,230 | 4,490 | 2,382 | 2,108 | 219 | 2 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-androiddeviceprovisioning/gen/Network/Google/Resource/AndroidDeviceProvisioning/Customers/Devices/RemoveConfiguration.hs | mpl-2.0 | 5,752 | 0 | 17 | 1,225 | 779 | 454 | 325 | 117 | 1 |
-- |
-- Module : GameKeeper.API.Overview
-- Copyright : (c) 2012-2015 Brendan Hay <brendan@soundcloud.com>
-- License : This Source Code Form is subject to the terms of
-- the Mozilla Public License, v. 2.0.
-- A copy of the MPL can be found in the LICENSE file or
-- ... | brendanhay/gamekeeper | src/GameKeeper/API/Overview.hs | mpl-2.0 | 2,896 | 0 | 13 | 861 | 708 | 385 | 323 | -1 | -1 |
module Main (main) where
main = putStrLn "Hello, World!" | pwnulatr/LoL-Hello-World | Code/Haskell/Hello_World.hs | unlicense | 57 | 0 | 5 | 9 | 17 | 10 | 7 | 2 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Kubernetes.V1.ExecAction where
import GHC.Generics
import Data.Text
import qualified Data.Aeson
-- | ExecAction describes a \"run in container... | minhdoboi/deprecated-openshift-haskell-api | kubernetes/lib/Kubernetes/V1/ExecAction.hs | apache-2.0 | 906 | 0 | 10 | 143 | 86 | 52 | 34 | 14 | 0 |
{-
Copyright 2015 Raghu Kaippully
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 agreed to in... | rkaippully/laydown | src/main/Main.hs | apache-2.0 | 1,132 | 0 | 10 | 237 | 198 | 96 | 102 | 23 | 2 |
{-# LANGUAGE OverloadedStrings #-}
-----------------------------------------------------------------------------
-- |
-- Module : Graphics.Hoodle.Render.Util
-- Copyright : (c) 2011-2013 Ian-Woo Kim
--
-- License : BSD3
-- Maintainer : Ian-Woo Kim <ianwookim@gmail.com>
-- Stability : experimental
-- Por... | wavewave/hoodle-render | src/Graphics/Hoodle/Render/Util.hs | bsd-2-clause | 984 | 0 | 10 | 206 | 245 | 133 | 112 | 19 | 1 |
{-# LANGUAGE CPP #-}
module Buster.Util (decodeFileEither,
SomeException,
Exception,
pokemonException,
tryPokemonIO) where
import Control.Applicative
import Data.Yaml (FromJSON, decodeHelper)
import qualified Text.Libyaml as Y (decodeFile)... | MichaelXavier/Buster | src/Buster/Util.hs | bsd-2-clause | 3,505 | 0 | 26 | 793 | 724 | 390 | 334 | 29 | 1 |
module Bassbull where
import qualified Data.ByteString.Lazy as BL
import qualified Data.Foldable as F
-- from cassava
import Data.Csv.Streaming
-- a simple type alias for data
type BaseballStats = (BL.ByteString, Int, BL.ByteString, Int)
fourth:: (a, b, c, d) -> d
fourth (_, _, _, d) = d
baseballStats:: BL.ByteStri... | EDeijl/BassBull | src/Bassbull.hs | bsd-3-clause | 595 | 0 | 10 | 101 | 204 | 119 | 85 | 15 | 1 |
-- Copyright 2019 Google LLC
--
-- Use of this source code is governed by a BSD-style
-- license that can be found in the LICENSE file or at
-- https://developers.google.com/open-source/licenses/bsd
{-# LANGUAGE CPP #-}
module GHC.SourceGen.Lit.Internal where
#if MIN_VERSION_ghc(9,2,0)
import GHC.Types.SourceText (So... | google/ghc-source-gen | src/GHC/SourceGen/Lit/Internal.hs | bsd-3-clause | 1,152 | 0 | 9 | 160 | 166 | 102 | 64 | 14 | 3 |
{-# LANGUAGE OverloadedStrings #-}
{-|
Module : Web.Lightning.Types.Visualization
Description : Visualization type
Copyright : (c) Connor Moreside, 2016
License : BSD-3
Maintainer : connor@moresi.de
Stability : experimental
Portability : POSIX
Describes the primary visualization return type along
with s... | cmoresid/lightning-haskell | src/Web/Lightning/Types/Visualization.hs | bsd-3-clause | 3,803 | 0 | 11 | 1,099 | 496 | 283 | 213 | 54 | 2 |
-- | Code generation for the Static Pointer Table
--
-- (c) 2014 I/O Tweag
--
-- Each module that uses 'static' keyword declares an initialization function of
-- the form hs_spt_init_<module>() which is emitted into the _stub.c file and
-- annotated with __attribute__((constructor)) so that it gets executed at
-- start... | sdiehl/ghc | compiler/main/StaticPtrTable.hs | bsd-3-clause | 10,673 | 0 | 21 | 2,717 | 1,666 | 879 | 787 | 123 | 5 |
{-# LANGUAGE DeriveFunctor, DeriveFoldable, DeriveTraversable, FlexibleContexts #-}
module Language.Typo.ASTs
( Value(..)
, Op(..)
, Surface(..)
, Redex(..)
, ANF(..)
, Definition(..)
, Program(..)
, Anf -- :: ContT ANF (State Int)
, Gensym -- :: State Int
, runAnf -- :: Anf Redex ... | seliopou/typo | Language/Typo/ASTs.hs | bsd-3-clause | 2,608 | 0 | 17 | 721 | 1,040 | 556 | 484 | 89 | 5 |
-- |Low-level routines for generating, extending, and destroying circuits. We
-- strongly recommend not using this module unless you have a very good reason.
-- You should probably just use the high-level Tor module or the CircuitManager
-- module instead.
{-# LANGUAGE RecordWildCards #-}
module Tor.Circuit(
-- ... | GaloisInc/haskell-tor | src/Tor/Circuit.hs | bsd-3-clause | 45,574 | 0 | 25 | 13,149 | 12,222 | 6,089 | 6,133 | 856 | 22 |
-- | In this module we intend to export some internal functions.
--
-- __Important note__: the authors of this library imply no assurance whatsoever
-- of the stability or functionality of the API exposed here, and compatibility
-- may break even by minor version changes. Rely on these at your
-- own risk.
--
-- The re... | mvdan/hint | src/Hint/Internal.hs | bsd-3-clause | 1,145 | 0 | 5 | 183 | 43 | 35 | 8 | 3 | 0 |
-- | Import this module qualified like this:
--
-- >>> import qualified Logging as Log
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE OverloadedStrings #-}
module Logging
( module Logging
) where
import Control.Monad.Logger
import Control.Monad.Trans
import Data.Aeson.TH
import Data.Int
import Data.Text ... | nejla/auth-service | service/src/Logging.hs | bsd-3-clause | 3,998 | 0 | 11 | 1,194 | 913 | 500 | 413 | 160 | 1 |
-- | Implements a rare-first algorithm for piece selection.
module Network.BitTorrent.PieceSelection (
AvailabilityData
, getNextPiece
, addToAvailability
, removeFromAvailability
, getIncompletePieces
) where
import Data.Word
import Data.Vector.Unboxed ((//), (!))
import qualified Data.Vector.Unboxed as VU
import N... | farnoy/torrent | src/Network/BitTorrent/PieceSelection.hs | bsd-3-clause | 2,038 | 0 | 17 | 432 | 505 | 283 | 222 | -1 | -1 |
{-# LANGUAGE NoMonomorphismRestriction #-}
module Quote (
Quote(..)
, Bid(..)
, showQuote
) where
import qualified Data.Time as T
import qualified Data.ByteString.Char8 as BS
import Debug.Trace
data Quote = Quote {
-- [note] `accepTime` must be first for ordering to work correctly!
acceptTime :: !T... | iteloo/tsuru-sample | src/Quote.hs | bsd-3-clause | 863 | 0 | 11 | 232 | 275 | 157 | 118 | 42 | 1 |
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables, FlexibleContexts, RankNTypes #-}
{-| This is a partial parsing of the GPX 1.0 and 1.0 exchange types.
-}
module Geo.GPX.Conduit
( Track(..), GPX(..), Segment(..), Point(..)
, readGPXFile, pt
) where
import Control.Monad.Trans.Control
import ... | TomMD/gpx-conduit | Geo/GPX/Conduit.hs | bsd-3-clause | 5,681 | 0 | 20 | 1,682 | 1,578 | 841 | 737 | -1 | -1 |
----------------------------------------------------------------------
-- |
-- Module : Text.Mime
-- Copyright : (c) Jun Mukai 2006
-- License : BSD-style (see the file LICENSE)
--
-- Maintainer : mukai@jmuk.org
-- Stability : experimental
-- Portability : portable
--
-- Mime Parser
--
module Te... | d3zd3z/HaskellNet-old | Text/Mime.hs | bsd-3-clause | 13,028 | 0 | 19 | 5,296 | 4,103 | 2,082 | 2,021 | 270 | 6 |
-- |Routines for rendering router descriptions.
module Tor.RouterDesc.Render(
renderRouterDesc
)
where
import Control.Monad
import Crypto.Hash.Easy
import Crypto.Number.Serialize
import Crypto.PubKey.RSA
import Crypto.PubKey.RSA.PKCS15
import Data.Bits
import Data.ByteArray(convert)
import Data.ByteSt... | GaloisInc/haskell-tor | src/Tor/RouterDesc/Render.hs | bsd-3-clause | 10,431 | 0 | 16 | 3,130 | 3,138 | 1,456 | 1,682 | 288 | 3 |
{-# LANGUAGE DeriveDataTypeable #-}
module Models.Internal.Exception where
import Control.Monad.CatchIO (Exception (..), throw)
import Control.Monad.Trans (MonadIO)
import qualified Data.Text as T
import Data.Typeable
import Database.MongoDB (Failure (..))
d... | HaskellCNOrg/snap-web | src/Models/Internal/Exception.hs | bsd-3-clause | 1,086 | 0 | 7 | 269 | 267 | 148 | 119 | 20 | 1 |
{-# LANGUAGE TypeFamilies, MultiParamTypeClasses, FlexibleInstances, UndecidableInstances, FlexibleContexts, DeriveGeneric #-}
module QueryArrow.Cache where
import QueryArrow.DB.DB
import QueryArrow.Syntax.Term
import QueryArrow.Semantics.TypeChecker
import QueryArrow.Syntax.Type
import QueryArrow.QueryPlan
im... | xu-hao/QueryArrow | QueryArrow-db-cache/src/QueryArrow/Cache.hs | bsd-3-clause | 3,614 | 0 | 16 | 769 | 1,005 | 512 | 493 | 72 | 1 |
module Hmond.Metrics ( metrics
, runMetrics
) where
import Hmond.Types
import Hmond.Generators
metrics :: [Metric]
metrics = [ makeMetric fixedGenerator (MtInt32 1) "fixed int"
, makeMetric fixedGenerator (MtDouble 1.5) "fixed double"
, makeMetric decreme... | benarmston/hmond | src/Hmond/Metrics.hs | bsd-3-clause | 776 | 0 | 9 | 211 | 194 | 102 | 92 | 15 | 1 |
{-# LANGUAGE StandaloneDeriving #-}
module Language.Haskell.Migrate.MRP
(
mrp
, Opts(..)
, OutputOpt(..)
) where
import qualified GHC.SYB.Utils as SYB
import qualified Data.Generics as SYB
import qualified FastString as GHC
import qualified GHC as GHC
import qualified Outputable as GHC
imp... | hvr/Hs2010To201x | src/Language/Haskell/Migrate/MRP.hs | bsd-3-clause | 13,980 | 0 | 21 | 2,900 | 3,659 | 1,884 | 1,775 | 224 | 3 |
module Aws.ElasticTranscoder
( module Aws.ElasticTranscoder.Commands
, module Aws.ElasticTranscoder.Core
) where
import Aws.ElasticTranscoder.Commands
import Aws.ElasticTranscoder.Core
| cdornan/aws-elastic-transcoder | Aws/ElasticTranscoder.hs | bsd-3-clause | 198 | 0 | 5 | 27 | 34 | 23 | 11 | 5 | 0 |
module System.IO.Strict.AsSio
( module System.IO.Strict.AsSio
) where
-- generated by https://github.com/rvion/ride/tree/master/jetpack-gen
import qualified System.IO.Strict as I
-- sio_getContents :: IO String
sio_getContents = I.getContents
-- sio_hGetContents :: Handle -> IO String
sio_hGetContents = I.hGetC... | rvion/ride | jetpack/src/System/IO/Strict/AsSio.hs | bsd-3-clause | 470 | 0 | 5 | 66 | 60 | 41 | 19 | 7 | 1 |
-- HACKERRANK: Filter Elements
-- https://www.hackerrank.com/challenges/filter-elements
module Main where
--import qualified Data.List.Split as S
import qualified Data.Set as S
import Data.List
import qualified Control.Monad as M
splitBy delimiter = foldr f [[]]
where f c l@(x:xs) | c == delimiter = []:l... | everyevery/programming_study | hackerrank/functional/filter-elements/filter-elements.hs | mit | 1,541 | 0 | 13 | 654 | 513 | 265 | 248 | 31 | 5 |
-- CIS 194 Homework 3
module Log where
import Control.Applicative ( (<$>) )
import Text.Read ( readMaybe )
-- | The classification of a message
data MessageType = Info
| Warning
| Error Int -- ^ The parameter is the severity of the error
deriving (Show, Eq)
-- ... | romanofski/codesnippets | haskellCIS194/homework3/Log.hs | unlicense | 1,743 | 0 | 10 | 487 | 351 | 190 | 161 | 34 | 1 |
{-# LANGUAGE ViewPatterns #-}
-- | Common definitions for the Haskell runtime and code generator.
module Language.K3.Runtime.Common (
PeerBootstrap
, SystemEnvironment
, defaultSystem
) where
import Language.K3.Core.Annotation
import Language.K3.Core.Common
import Language.K3.Core.Literal
import qualified La... | DaMSL/K3 | src/Language/K3/Runtime/Common.hs | apache-2.0 | 1,051 | 0 | 10 | 224 | 210 | 134 | 76 | 19 | 1 |
{-# LANGUAGE CPP, RankNTypes, ScopedTypeVariables #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
-----------------------------------------------------------------------------
-- |
-- Module : Haddock.InterfaceFile
-- Copyright : (c) David Waern 2006-2009,
-- Mateusz Kowalczyk 2013
-- Licens... | jgm/haddock | src/Haddock/InterfaceFile.hs | bsd-2-clause | 18,755 | 0 | 28 | 6,506 | 5,263 | 2,474 | 2,789 | -1 | -1 |
module Numeric.Band.Rectangular
( Rect(..)
) where
import Numeric.Algebra.Class
import Numeric.Algebra.Idempotent
import Data.Semigroupoid
-- | a rectangular band is a nowhere commutative semigroup.
-- That is to say, if ab = ba then a = b. From this it follows
-- classically that aa = a and that such a band is ... | athanclark/algebra | src/Numeric/Band/Rectangular.hs | bsd-3-clause | 585 | 0 | 7 | 119 | 162 | 87 | 75 | 11 | 0 |
module PTS.Dynamics.Module where
import PTS.Dynamics.Binding (Bindings)
import PTS.Syntax (ModuleName)
data Module m
= Module [ModuleName] ModuleName (Bindings m)
deriving (Show)
| Blaisorblade/pts | src-lib/PTS/Dynamics/Module.hs | bsd-3-clause | 189 | 0 | 8 | 30 | 58 | 35 | 23 | 6 | 0 |
module Course
(
module L01.Optional
, module L01.Validation
, module L02.List
, module L03.Person
, module L03.Parser
, module L04.Fluffy
, module L04.Misty
, module L05.Testing
, module L06.JsonValue
, module L06.MoreParser
, module L06.JsonParser
, module L07.Anagrams
, module L08.FastAnagrams
, module L09.EditDist... | juretta/course | src/Course.hs | bsd-3-clause | 717 | 0 | 5 | 90 | 188 | 120 | 68 | 34 | 0 |
{- |
Module : $Header$
Description : map of the known logics and serializations
Copyright : (c) Soeren Schulze, Uni Bremen 2012
License : GPLv2 or higher, see LICENSE.txt
Maintainer : Christian.Maeder@dfki.de
Stability : provisional
Portability : portable
-}
module Logic.KnownIris where
import ... | keithodulaigh/Hets | Logic/KnownIris.hs | gpl-2.0 | 1,313 | 0 | 9 | 243 | 292 | 163 | 129 | 25 | 1 |
{-# LANGUAGE NoImplicitPrelude, OverloadedStrings #-}
{-# OPTIONS -Wall #-}
module Main(main) where
import Control.Applicative
import Control.Monad hiding (forM, mapM, sequence)
import Data.Foldable
import Data.Tensor.TypeLevel
import Data.Traversable
import quali... | nushio3/Paraiso | examples/Hydro/HydroMain.hs | bsd-3-clause | 11,383 | 0 | 19 | 3,015 | 4,534 | 2,307 | 2,227 | 240 | 3 |
{-# OPTIONS_HADDOCK hide, prune #-}
module Settings.StaticFiles where
import Settings (appStaticDir, compileTimeAppSettings)
import Yesod.Static (staticFiles)
-- This generates easy references to files in the static directory at compile time,
-- giving you compile-time verification that referenced files exist.
--... | mb21/qua-kit | apps/hs/qua-server/src/Settings/StaticFiles.hs | mit | 730 | 0 | 7 | 116 | 52 | 35 | 17 | -1 | -1 |
{-# LANGUAGE Safe #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NoImplicitPrelude #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Version
-- Copyright : (c) The University of Glasgow 2004
-- License : BSD-style (see the file libraries/base/LICENSE... | siddhanathan/ghc | libraries/base/Data/Version.hs | bsd-3-clause | 5,516 | 0 | 12 | 1,235 | 506 | 304 | 202 | 41 | 1 |
module T13450 where
example = foo
where foo = ''
| sdiehl/ghc | testsuite/tests/parser/should_fail/T13450.hs | bsd-3-clause | 52 | 1 | 4 | 13 | 13 | 10 | 3 | -1 | -1 |
{-# LANGUAGE ImplicitParams #-}
module T8474 where
data D = D Int deriving Show
-- In 7.7 this took exponential time!
slow_to_compile :: IO ()
slow_to_compile = do
tst1 <- return 1
let ?tst1 = tst1
let ?tst2 = tst1
let ?tst3 = tst1
let ?tst4 = tst1
let ?tst5 = tst1
let ?tst6 = tst1
let ?tst7 = tst1
... | frantisekfarka/ghc-dsi | testsuite/tests/typecheck/should_compile/T8474.hs | bsd-3-clause | 337 | 0 | 9 | 85 | 116 | 56 | 60 | 14 | 1 |
{-# LANGUAGE OverloadedStrings #-}
-----------------------------------------------------------------------------
--
-- Module : Parser
-- Copyright :
-- License : AllRightsReserved
--
-- Maintainer :
-- Stability :
-- Portability :
--
-- |
--
-------------------------------------------------------------... | uvNikita/SyntacticAnalyzer | src/Parser.hs | mit | 5,899 | 0 | 13 | 1,442 | 1,994 | 1,062 | 932 | -1 | -1 |
{-
Copyright (c) 2015 Nils 'bash0r' Jonsson
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distr... | project-horizon/framework | src/lib/Language/JavaScript/DSL/TypeAliases.hs | mit | 2,633 | 0 | 6 | 473 | 191 | 133 | 58 | 30 | 0 |
{-# LANGUAGE OverloadedStrings #-}
module Houndell.Models where
import Data.Aeson (FromJSON (..), Value (..), (.:))
import Data.Map
import Data.Text.Lazy (Text (..))
data Match = Match {
after :: [Text],
before :: [Text],
line :: Text,
lineNumber :: In... | dtrsan/houndell | src/Houndell/Models.hs | mit | 1,640 | 0 | 13 | 505 | 448 | 254 | 194 | 57 | 0 |
import Hate
import Hate.Graphics.Shapes
data SampleState = SampleState {
r :: Int,
p :: Vec2
}
sampleLoad :: LoadFn SampleState
sampleLoad = return $ SampleState 0 (Vec2 150 150)
sampleDraw :: DrawFn SampleState
sampleDraw (SampleState r p) =
[ translate p $ circle (fromIntegral r)
, line p (Vec2 30... | maque/Hate | samples/sample_shapes.hs | mit | 819 | 0 | 16 | 256 | 303 | 160 | 143 | 25 | 3 |
{-# LANGUAGE OverloadedStrings #-}
module Network.Reddit (Sorting(..),
Page(..),
Link(domain, name, title, url),
Listing(..),
listing) where
import Control.Monad.Trans.Except
import Data.Aeson hiding (Result)
import Data.ByteSt... | rodrigosetti/hreddit | src/Network/Reddit.hs | mit | 3,207 | 0 | 15 | 1,196 | 849 | 476 | 373 | 72 | 6 |
{-# LANGUAGE CPP #-}
module GHCJS.DOM.SVGTests (
#if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT)
module GHCJS.DOM.JSFFI.Generated.SVGTests
#else
#endif
) where
#if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT)
import GHCJS.DOM.JSFFI.Generated.SVGTe... | plow-technologies/ghcjs-dom | src/GHCJS/DOM/SVGTests.hs | mit | 337 | 0 | 5 | 33 | 33 | 26 | 7 | 4 | 0 |
scoreToLetter :: Int -> Char
scoreToLetter n
| n > 90 = 'A'
| n > 80 = 'B'
| n > 70 = 'C'
| otherwise = 'F'
len [] = 0
len (x:s) = 1 + len s
listCopy [] = []
listCopy (x:s) = x : listCopy s
ones = 1 : ones
front :: Int -> [a] -> [a]
front _ [] = []
front 0 (x:s) = []
front n (x:s) = x : front (n-1) ... | hectoregm/racket | shriram/shriram-chapter7.hs | mit | 1,332 | 0 | 9 | 372 | 777 | 408 | 369 | 45 | 1 |
powers :: [a] -> [[a]]
powers [] = [[]]
powers (x:xs) = pxs `interleave` map (x:) pxs
where
pxs = powers xs
interleave :: [a] -> [a] -> [a]
interleave [] ys = ys
interleave xy [] = xy
interleave (x:xs) (y:ys) = x : y : interleave xs ys
| sdroege/snippets.hs | powers.hs | mit | 244 | 0 | 7 | 58 | 157 | 85 | 72 | 8 | 1 |
mnr = tail [0,1,2,3,4,5,6,7] :: [Integer]; {-Matrikelnummer-}
name = "Mustermann, Max" :: String; {- Familienname, Vorname(n) -}
knz = "E033 534" :: String {- Kennzahl -}
t1 = ("p1", (take 2.reverse.show)mnr, (head.words.(\n o ->o:name)'-')'+');
{- ("p1","]7","+Mustermann,") -}
t2 = (\x y z -> y.x.y); {- hier nur all... | Szuuuken/funk-prog-pruefungs-vorbereitung | pruefung-2018-03-02/Aufgabe01.hs | mit | 907 | 7 | 11 | 167 | 470 | 270 | 200 | 15 | 2 |
{-# LANGUAGE ExistentialQuantification #-}
{-# OPTIONS_GHC -fno-warn-unused-do-bind #-}
module Scheme48.Eval (readExpr, eval, primitiveBindings) where
import Control.Monad.Except
import System.IO
import Scheme48.Types
import Scheme48.Parsers
import Scheme48.StdLib
import Scheme48.Env
import Text.ParserCombinators.P... | buckie/scheme48 | src/Scheme48/Eval.hs | mit | 6,690 | 0 | 18 | 1,724 | 2,473 | 1,236 | 1,237 | 130 | 10 |
module Language.Dash.Parser.ParserSpec where
import Language.Dash.BuiltIn.BuiltInDefinitions
import Language.Dash.Error.Error (CompilationError (..))
import Language.Dash.IR.Ast
import Language.Dash.Parser.Lexer as L
import Language.Dash.Pa... | arne-schroppe/dash | test/Language/Dash/Parser/ParserSpec.hs | mit | 7,532 | 0 | 30 | 3,360 | 1,889 | 921 | 968 | 115 | 1 |
{-
Copyright (c) 2015 Nils 'bash0r' Jonsson
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distr... | project-horizon/framework | src/lib/Language/PolyDSL/Lib/ModuleDataBool.hs | mit | 1,653 | 0 | 11 | 308 | 89 | 49 | 40 | 7 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
module Main where
import Yesod
import Dispatch
import Foundation
main :: IO ()
main = warp 3001 DwarvenSite
| lucas8/website | haskell/src/Main.hs | mit | 210 | 0 | 6 | 34 | 36 | 22 | 14 | 9 | 1 |
{-# LANGUAGE OverloadedStrings #-}
import Control.Concurrent
import Network
import System.Environment
import System.Exit
import System.IO
import Data.ConfigFile
import Data.Either.Utils
import qualified Data.UUID.V1 as U1
import Gatekeeper.CRDT
import Gatekeeper.Heartbeat
import Gatekeeper.LDAP
import Gatekeeper.Netw... | dgonyeo/gatekeeper | Main.hs | mit | 3,259 | 0 | 17 | 1,429 | 836 | 403 | 433 | 59 | 3 |
module GSMCommon where
data GSMBand = GSM850 | EGSM900 | DCS1800 | PCS1900 deriving (Show)
instance Enum GSMBand where
fromEnum = fromJust . flip lookup table
toEnum = fromJust . flip lookup (map swap table)
table = [(GSM850, 45000), (EGSM, 45000), (DCS1800, 95000), (PCS1900, 80000)]
-- unsigned GSM::uplinkFr... | victoredwardocallaghan/Congo | src/GSMCommon.hs | gpl-2.0 | 1,245 | 0 | 9 | 221 | 148 | 102 | 46 | 6 | 1 |
-- grid is a game written in Haskell
-- Copyright (C) 2018 karamellpelle@hotmail.com
--
-- This file is part of grid.
--
-- grid is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the Lice... | karamellpelle/grid | source/Game/Grid/Output/Plain/ShadePath.hs | gpl-3.0 | 9,229 | 0 | 17 | 2,503 | 2,472 | 1,216 | 1,256 | 170 | 2 |
-- grid is a game written in Haskell
-- Copyright (C) 2018 karamellpelle@hotmail.com
--
-- This file is part of grid.
--
-- grid is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the Lice... | karamellpelle/grid | source/Game/Run/RunData/Plain/ShadeScene.hs | gpl-3.0 | 3,813 | 0 | 13 | 1,129 | 1,002 | 530 | 472 | 84 | 1 |
module Main where
import Codec.Picture
import Data.Word
import Data.Complex
import Data.Colour.RGBSpace
import Data.Colour.RGBSpace.HSL
import Data.Colour.SRGB
bailoutRadius :: Double
bailoutRadius = 10 ^ 100 --4
exponent' :: Complex Double -> Integer -> Complex Double
exponent' n 1 = n
exponent' n e = (exponent' n (... | Outurnate/fluffy-turtle | mandelbrot.hs | gpl-3.0 | 3,256 | 0 | 19 | 1,355 | 1,035 | 537 | 498 | 50 | 4 |
module Hadolint.Rule.DL3034 (rule) where
import Hadolint.Rule
import qualified Hadolint.Shell as Shell
import Language.Docker.Syntax
rule :: Rule Shell.ParsedShell
rule = simpleRule code severity message check
where
code = "DL3034"
severity = DLWarningC
message = "Non-interactive switch missing from `zy... | lukasmartinelli/hadolint | src/Hadolint/Rule/DL3034.hs | gpl-3.0 | 837 | 0 | 11 | 215 | 189 | 105 | 84 | 23 | 2 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-containeranalysis/gen/Network/Google/Resource/ContainerAnalysis/Projects/Notes/GetIAMPolicy.hs | mpl-2.0 | 6,258 | 0 | 16 | 1,265 | 790 | 466 | 324 | 116 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/SubAccounts/Get.hs | mpl-2.0 | 3,141 | 0 | 14 | 729 | 421 | 249 | 172 | 62 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Update.hs | mpl-2.0 | 3,416 | 0 | 14 | 790 | 463 | 276 | 187 | 71 | 1 |
module BodyMassIndex where
bmi :: Float -> Float -> String
bmi a b
| bmi' <= 18.5 = "Underweight"
| bmi' <= 25.0 = "Normal"
| bmi' <= 30.0 = "Overweight"
| bmi' > 30 = "Obese"
where bmi' = a / b / b
| ice1000/OI-codes | codewars/301-400/calculate-bmi.hs | agpl-3.0 | 213 | 0 | 8 | 59 | 91 | 45 | 46 | 8 | 1 |
module Codewars.Exercises.Balanced where
isBalanced :: String -> Bool
isBalanced ")(" = False
isBalanced xs = length [ a | a <- xs, a == '(' ] == length [ a | a <- xs, a == ')' ]
| ice1000/OI-codes | codewars/1-100/are-the-brackets-balanced.hs | agpl-3.0 | 180 | 0 | 9 | 39 | 80 | 42 | 38 | 4 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
import Development.Shake
import Development.Shake.FilePath
-- |Track the uuid of an image, so we can rebuild our part of the chain if a FROM container outside of our project changes
trackImage :: FilePath -> String -> Action ()
trackImage uuidFile image = do
Stdout stdout ... | mostalive/docker-ghcjs | Build.hs | apache-2.0 | 2,424 | 0 | 16 | 596 | 626 | 304 | 322 | 54 | 1 |
module XML
( testXML
, uri
, pickleElem
) where
import Data.Maybe (fromJust)
import Network.URI (URI, parseURIReference)
import qualified Test.HUnit as U
import qualified Text.XML.HXT.Core as HXT
import qualified Text.XML.HXT.HTTP as HXT (withHTTP)
import qualified Text.XML.HXT.DOM.XmlNode as DOM
parseXML ::... | dylex/hsaml2 | test/XML.hs | apache-2.0 | 936 | 0 | 13 | 153 | 354 | 194 | 160 | 22 | 1 |
module Delahaye.A337661 (a337661_list, a337661) where
import Delahaye.A337655 (a337655)
import Helpers.Delahaye (rowTable)
a337661 :: Int -> Integer
a337661 n = a337661_list !! (n-1)
a337661_list :: [Integer]
a337661_list = rowTable (*) a337655
| peterokagey/haskellOEIS | src/Delahaye/A337661.hs | apache-2.0 | 247 | 0 | 7 | 32 | 82 | 48 | 34 | 7 | 1 |
-- http://www.codewars.com/kata/51675d17e0c1bed195000001
module LargestDigits where
import Data.List
digit5 :: String -> Int
digit5 = maximum . map (read . take 5) . init . tails | Bodigrim/katas | src/haskell/5-Largest-5-digit-number-in-a-series.hs | bsd-2-clause | 180 | 0 | 11 | 26 | 49 | 27 | 22 | 4 | 1 |
import Yesod.Default.Config (fromArgs)
import Yesod.Default.Main (defaultMain)
import Application (withLollerSite)
import Prelude (IO)
main :: IO ()
main = defaultMain fromArgs withLollerSite | MostAwesomeDude/lollerskates | main.hs | bsd-2-clause | 216 | 0 | 6 | 45 | 59 | 34 | 25 | 6 | 1 |
{-# LANGUAGE DeriveGeneric, DeriveAnyClass #-}
module DetParamInf.QKPMap (QKPMap(..), empty, insert, lookup1, lookup2, lookup3, lookup4, collisions4, toList1, toList2, toList3, toList4, delete1, delete2, delete3, delete4, delete) where
import Data.Hashable
import GHC.Generics (Generic)
import Control.DeepSeq
import Da... | palas/detparaminf | src/DetParamInf/QKPMap.hs | bsd-2-clause | 5,415 | 0 | 14 | 1,484 | 2,812 | 1,489 | 1,323 | 92 | 2 |
{-# LANGUAGE OverloadedStrings #-}
{-| This library exports two functions: `dhallToCsv` and `codeToValue`.
The former converts a Dhall expression (with imports resolved already) into a
sequence of CSV `NamedRecord`s (from the @cassava@ library) while the latter
converts a `Text` containing Dhall code into ... | Gabriel439/Haskell-Dhall-Library | dhall-csv/src/Dhall/Csv.hs | bsd-3-clause | 13,054 | 0 | 14 | 5,967 | 1,255 | 655 | 600 | 94 | 14 |
-- ------------------------------------------------------------
{- |
Module : Yuuko.Text.XML.HXT.Parser.XmlDTDTokenParser
Copyright : Copyright (C) 2005 Uwe Schmidt
License : MIT
Maintainer : Uwe Schmidt (uwe@fh-wedel.de)
Stability : experimental
Portability: portable
Version : $Id: X... | nfjinjing/yuuko | src/Yuuko/Text/XML/HXT/Parser/XmlDTDTokenParser.hs | bsd-3-clause | 2,817 | 41 | 11 | 695 | 604 | 334 | 270 | 65 | 1 |
import Allegro
import Allegro.Audio
import Allegro.C.Audio
import Control.Concurrent
main :: IO ()
main =
allegro $
do v <- createVoice 44000 Int16 ChannelConf_2
m <- createMixer 44000 Int16 ChannelConf_2
s <- loadAudioStream "../resources/song.wav" 2 1000
attachAudioStreamToMixer s m
attachMi... | yav/allegro | examples/hs/audio.hs | bsd-3-clause | 372 | 0 | 11 | 80 | 114 | 54 | 60 | 13 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE QuasiQuotes #-}
{-
This is basically very manual test. Check following link for details.
Google web oauth: https://developers.google.com/accounts/docs/OAuth2WebServer
Google OAuth 2.0 playround: https://developers.google.com/oa... | reactormonk/hoauth2 | example/Google/test.hs | bsd-3-clause | 5,401 | 0 | 14 | 1,581 | 1,047 | 561 | 486 | 97 | 2 |
module ProjectEuler.Problem043 (solution043) where
import Data.Digits
import Util
p :: [Integer]
p = [2, 3, 5, 7, 11, 13, 17]
toInt :: [Integer] -> Integer
toInt = unDigits 10
isDivisor :: Integral a => a -> a -> Bool
isDivisor d x = rem x d == 0
subStringDivisibilityProperty :: [Integer] -> Bool
subStringDivisibi... | guillaume-nargeot/project-euler-haskell | src/ProjectEuler/Problem043.hs | bsd-3-clause | 521 | 0 | 10 | 90 | 202 | 109 | 93 | 13 | 1 |
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FunctionalDependencies #-}
module FiniteDifference where
import qualified Data.Vector as V
data Discretization = Discretization {
timeDelta :: Double,
spaceDelta :: Double
} deriving (Show)
type UpdateFunction a = (Discretization -> V.Vector a -> Int -> a... | wdicharry/hsfd | Src/FiniteDifference.hs | bsd-3-clause | 1,740 | 0 | 13 | 369 | 494 | 249 | 245 | 30 | 1 |
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, MagicHash,
FlexibleInstances, FlexibleContexts, UnboxedTuples, DeriveDataTypeable, CPP,
BangPatterns #-}
#ifdef __GLASGOW_HASKELL__
#if __GLASGOW_HASKELL__ < 610
{-# OPTIONS_GHC -frewrite-rules #-}
#else
{-# OPTIONS_GHC -fenable-rewrite-rules #-}
#endif
#e... | hanshoglund/carray | Data/Array/CArray/Base.hs | bsd-3-clause | 22,366 | 0 | 17 | 5,706 | 7,283 | 3,782 | 3,501 | 348 | 6 |
module GHCJS.Three
(
module GHCJS.Three.Monad,
module GHCJS.Three.Matrix,
module GHCJS.Three.Vector,
module GHCJS.Three.Euler,
module GHCJS.Three.Face3,
module GHCJS.Three.Box3,
module GHCJS.Three.Sphere,
module GHCJS.Three.Camera,
module GHCJS.Three.Projection,
mod... | manyoo/ghcjs-three | src/GHCJS/Three.hs | bsd-3-clause | 2,838 | 0 | 11 | 440 | 615 | 411 | 204 | 86 | 1 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
\section[TcPatSyn]{Typechecking pattern synonym declarations}
-}
module ETA.TypeCheck.TcPatSyn ( tcInferPatSynDecl, tcCheckPatSynDecl
, tcPatSynBuilderBind, tcPatSynBuilderOcc
) where
import ETA.HsSyn.Hs... | alexander-at-github/eta | compiler/ETA/TypeCheck/TcPatSyn.hs | bsd-3-clause | 24,740 | 0 | 20 | 8,574 | 6,135 | 3,198 | 2,937 | 416 | 20 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.